Git post-receive hook for Puppet control repo updates

I made a fairly simple post-receive hook setup to automatically update my Puppet master when I push changes to my control repo. I keep the repo in gitolite, so I wanted to use a regular git hook rather than web hook magic (or even magicer Puppet Enterprise Code Manager magic). My control repo itself is based on the puppetlabs control-repo on github. Essentially the idea is that every branch in the repo becomes a Puppet environment on your master, complete with automatically updated modules based on a Puppetfile....

2017-04-05 · James McDonald

Useful Haskell Learnings

isSexyPerson x = if x == "Oda" then x ++ " is indeed sexy!" else "The sexiness of " ++ x ++ " is unknown." Most useful.

2013-08-03 · James McDonald

Import Things tasks into Apple’s Reminders

OK, so I was making a list of things to do today, but then I decided that having created them in Things, I wanted to move them to Apple’s Reminders. Don’t ask – I’m a task list fetishist. A neat trick you can do with Cultured Code’s Things is to select a bunch of tasks and drag them to a text editor, which will create one line per task with any note appended in brackets....

2012-12-08 · James McDonald

Vag klokke

I localised my awesome fuzzyclock.py script to Norwegian language and, uh, regional time-reading standards. Behold the glory of vagklokke.py! A little terminal in the top right of my screen now proudly proclaims: <br /> Datoen er 2012-11-13<br /> Klokka er fem på elleve<br /> It was fun to work out how to handle “x på/over halv” without too many horrible range conditions. I haven’t bothered to remove stale things like ‘tjuefem’ from the minute list, because it ain’t broke....

2012-11-13 · James McDonald

Linux locale problems over ssh from a Mac

Most users of Debian/Ubuntu have at some time seen these annoying messages: <br /> perl: warning: Setting locale failed.<br /> perl: warning: Please check that your locale settings:<br /> LANGUAGE = (unset),<br /> LC_ALL = (unset),<br /> LC_CTYPE = "UTF-8",<br /> LANG = "en_GB.UTF-8"<br /> are supported and installed on your system.<br /> perl: warning: Falling back to the standard locale ("C").<br /> There are a variety of causes – usually locales not being generated properly or incorrect environment variables....

2011-10-06 · James McDonald