Adam Monsen

January 31, 2012

Auto-update bind 9 zone database serial numbers

Filed under: Default — Tags: , , — adam @ 3:45 pm PDT

This post is helpful for configuring emacs to automatically update the “Serial” in bind zone databases. I wanted to do the same in Vim, but the solutions in the comments of that post didn’t work for me. Here’s a version that does. It’s yours for free under the Affero GPL v3 (or any later version, at your preference):

function s:BindZoneSettings()
    function s:UpdateBindZoneSerial(date, num)
        if (strftime("%Y%m%d") == a:date)
            return a:date . a:num+1
        endif
        return strftime("%Y%m%d") . '01'
    endfunction
 
    function s:ReplaceBindZoneSerialLine()
        :%s/\(2[0-9]\{7}\)\([0-9]\{2}\)\(\s*;\s*Serial\)/\=UpdateBindZoneSerial(submatch(1), submatch(2)) . submatch(3)/g
    endfunction
 
    autocmd BufWritePre /etc/bind/db.* call ReplaceBindZoneSerialLine()
endfunction

September 19, 2011

offline HTML 5 validation

Filed under: Default — Tags: , , , , , — adam @ 11:05 am PDT

HTML 5 logo

I’m liking Henri Sivonen’s Validator.nu service. I’ve got it running locally, and it works well. I can use it as a web service and validate HTML from within Vim, using quickfix to rapidly resolve errors. My Jenkins CI server uses the same validator via phpunit tests.

Warning: it took me a very long time to get it running locally. Technically easy (just run a build script), but it downloads tons of libraries and files before it can do its job.

April 14, 2010

The Power of Lightweight Markups: Presentations

Filed under: Default — Tags: , , , — adam @ 12:21 am PDT

Are you busy clicking away at a slide deck for your next presentation? Want to try something a little different?

Non-nerdy folks following this blog, you’ll probably want to tune out now. Or not! I tried to write this for a wide audience, so come on down the rabbit hole if you dare.

(more…)

January 9, 2009

Passwordless SSH and other Tutorials

Filed under: Default — Tags: , , , — adam @ 3:00 pm PDT

New to GNU/Linux? Trying to get started with the same tools used by the pros? Check out linuxconfig.org.

I helped them with their Passwordless SSH tutorial, and I like the screencasts in the Vim tutorial.

September 24, 2008

I’m a Talker

Filed under: Default — Tags: , , , , , — adam @ 9:56 am PDT

I’ll be giving a couple of lectures/seminars this week in the Twin Cities. The first is tonight at the U of M (topic: Selenium), the second will be Saturday morning (topic: Vim). See here for announcements about future talks and materials from talks past.

Powered by WordPress