Latest inklings

Organizational Skills Beat Algorithmic Wizardry

Super Planet Crash

Game about creating a planetary system that can last at least 500 years. The more complexity and interaction between bodies, the higher your score!


Spin is a popular open-source software verification tool, used by thousands of people worldwide. The tool can be used for the formal verification of multi-threaded software applications.

"Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers" by Leslie Lamport

Huh. This looks interesting for modelling distributed systems. “TLA” refers to Temporal logic of actions.

Given an SSL/TLS certificate, walk all its intermediates to construct a CA bundle

While this script’s a hack, it blows my mind that there isn’t already something out there which does this.

Migrating from Pathogen to Vundle

Getting Apache, php-fpm, and in-app HTTP authentication working

Inside the vhost config for the site, include the following:

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

That way, the Authorization header will be passed through regardless of Apache’s usual filtering. Keep in mind that with this rule in place, you have to check for HTTP_AUTHORIZATION being empty too.

Cost of a PostgreSQL connection

Hadn’t heard of PgBouncer before, but I know of a few places where it’d be invaluable.

Knot DNS Server

Given it support adding and removing of zones on the fly, it could be preferable to NSD for something that I’ve currently got in production.

Update: Turns out NSD4 solves all the issues I had with NSD3, which is nice. I gave up on Knot DNS as it kept failing to stop, and wouldn’t give me a hint of why. Checked the zonefiles and the config, and they all were fine. Oh, well…

I just wish I could use NSD4 in that production system, but it’s not available for Debian 7.3 (wheezy).

Fixing permissions issues with Lubuntu 13.10

EDIT: Never mind. Seems like it was a coincidence. I think the issue is actually with lxdm. I switched to lightdm and everything was fine. Feh.

I’ve an old Dell Mini 12, and I recently upgraded it to run Lubuntu 13.10, but ran into issues where Network Manager wouldn’t let me do anything, and attempting to reboot or shutdown while logged in would cause the machine to complain that I was not authorised to do so. After some hunting around, I discovered an IRC log with a solution to the issue.

First of all, open up the file /etc/pam.d/common-session as root. You can do this from a terminal as follows:

$ sudo vim /etc/pam.d/common-session

Now, check that it contains the following line:

session optional

If not, add it. Once you’ve added it, have PAM update itself as with the following:

sudo pam-auth-update --force

And now the issue should be gone! You may need to log out and log back in again too.

I’m still having an issue with the wireless drivers themselves, which I haven’t been able to fix, even after installing the nonfree drivers package.


A better way to do credit card forms.

Barbara Liskov: The Power of Abstraction (OOPSLA keynote)


Collaborative JavaScript coding and debugging.

DevOps Eye for the Coding Guy: Metrics

Interesting! I’m already looking at Graphite for graphing, and StatsD looks interesting for stats collection.

Cap’n Proto

Protocol Buffers done better by the guy behind Protocol Buffers. Looks interesting.

Generating data files in

Needed this for automatically generating a Pygments stylesheet on installing a project of mine. This isn’t well-documented at all, unfortunately.


Guacamole Norteño

Python and the Realtime Web

Nice set of notes on writing applications in Python with WebSockets.

A Little Riak Book

Pynamo: Exploring the Dynamo Paper in Python

LL and LR Parsing Demystified

Nice summary.

What's in a Good Commit?

Enforce Single Responsibility for Your Commits


Incremental merge for git.

I’m not sure I quite see the value in this beyond that given by git-rebase as I’ve never encountered as situation where rebasing has ever lost any useful history, but it still looks worth checking out. Here’s a video from the git merge conference:

RFC 6797: HTTP Strict Transport Security (HSTS)

This specification defines a mechanism enabling web sites to declare themselves accessible only via secure connections and/or for users to be able to direct their user agent(s) to interact with given sites only over secure connections. This overall policy is referred to as HTTP Strict Transport Security. The policy is declared by web sites via the Strict-Transport-Security HTTP response header field and/or by other means, such as user agent configuration, for example.

I only actually heard about this recently, though the RFC’s been published since last November. To read.

LZ4 compression algorithm

Looks like an interesting alternative to LZO.


Python daemon that munches on logs and sends their contents to logstash.


logstash is a tool for managing events and logs. You can use it to collect logs, parse them, and store them for later use (like, for searching). Speaking of searching, logstash comes with a web interface for searching and drilling into all of your logs.

Requires Java. Looks pretty non-sucky.

Importing from Wordpress into Mezzanine

LMDB (Lightning Memory-Mapped Database)

LMDB is an ultra-fast, ultra-compact key-value data store developed by Symas for the OpenLDAP Project. It uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence of standard disk-based databases, and is only limited to the size of the virtual address space, (it is not limited to the size of physical RAM).

I can see places where this would be useful. In particular, it looks like it would’ve been a better choice of backing store for a small daemon I wrote recently for work. It’s compact nature and the fact it performs MVCC are attractive features to me. There are also Python bindings.

Screencast recording under Ubuntu

Noted for future reference:

avconv -strict experimental -f x11grab -r 25 -s 1024x768    \
       -i :0.0 -pre medium -f alsa -ac 2 -ar 22050 -i pulse \

I’ll have to decipher that myself some time, but for now it’s good enough to make note of it as I may need to do something like that at some point in the future.

Internet Draft: Managing SSH Keys for Automated Access - Current Recommended Practice

Senator David Norris's plea to save Seanad

Working with Excel Files in Python

Notes a number of useful packages if you’re stuck in a position (such as I am) where you need to be able to read and write .xls files.

Chroma Doze

A noise generator for Android devices. It’s open source, and the source is here.

I’d been looking for one of these for generating brownian noise and pink noise to help with concentration and for blocking out office noise without playing music.


Migration tool for SQLAlchemy.

Issues with nginx and php-fpm on FreeBSD

I spent an age trying to fix this, but the log output of neither nginx nor php-fpm gave any indication as to why I got nothing except empty responses when trying to access .php files.

Eventually, I stumbled across this post on ServerFault, which lead me to try adding this to the location section:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

And bingo! It starts working. I can’t fathom why php-fpm didn’t either respond with an error, either in the log or as a response, or couldn’t have fathomed it from the DOCUMENT_ROOT and SCRIPT_NAME headers. That’s some mighty good design! </sarcasm>

Falsehoods programmers believe about addresses

Omitted from this list is one that’s a big deal if you’re Irish: not every country uses postcodes.

PyPI Shields/Pins

PyPI Shields/Pins are shields for you GitHub repo, documentation or website that show your many times your project has been downloaded from PyPI or it’s latest version.