Against the flow

Testing HTTP redirects with Curl

We’ve got a really complex redirection setup for the current project at work, a mix of some general rules ( to, some oddball domain redirects ( to, and some more esoteric ones thrown in there for luck. I started off briefing my colleague with a description of what I needed, but this very quickly became too complex and I realised I really needed to give him a set of initial URLs and expected results. Why not express these rules in a quick test script? My colleague could run the script against the redirects as he wrote them, and see the successful ones and the failures, along with detail about why they failed. Continue reading


Teaching myself to tell tales

One of the joys of having a young baby, I’m finding, is reading. I wasn’t expecting reading to come to us so early, it was my mum who suggested it when Rufus was only three or four months old. He loves us reading to him; the shapes, the colours, the closeness, the sound of our voices, the turning of pages, the taste of the corner of each page as he takes a pensive suckle before it
goes past. I’ve recently started to wonder if I can make stories up for him. I remember at OFFF in Lisbon, Joshua Davis was talking about creativity and how he made up stories to order for his daughter every bedtime. I’d like to give it a go, and I thought
writing about it would give me a chance to think it through and some motivation to continue.

Continue reading


Sleeping on London Bridge

Our son Rufus slept in different ways as he reached
different milestones. The first kind of sleep, when he was a tiny
baby, was more a some kind of rapidly cycling consciousness and
unconsciousness designed to disrupt parental sleep, this was a
phase where we were lulled into a false sense of security. “It’s
easy having a baby! Look here we are, out at the pub, and our baby
is sleeping next to us
at nine-o-clock at night!”. This phase passed and we fairly rapidly
realised that Rufus wasn’t going to be the kind of baby who could
just fall asleep on the play mat, or in the pushchair at a café, or
in our arms at the pub, or in fact anywhere unless we did something
to sort this situation out.

Continue reading

“雨後彎 Swoosh after the rain” / 香港體育建築形之界 Hong Kong Sports Architecture Forms Division / SML.20130331.7D.37298.BW (cropped), © See-ming Lee

Human readable Gravity Forms exports using XSL

We have a client who needs to review a very complex form created in Gravity Forms. The form has many fields, and to make things worse the labels displayed to the user and the labels displayed to the administrator when someone submits the form are different. Because Gravity Forms has an XML export, it occurred to me that I should be able to create some transformational XSL to turn that XML export file into a human readable description of the form. Continue reading

Bowler hat lamps in the jazz corner of Cafe Belgique, © Hornbeam Wildlife Studio

Alfred Workflow to open a directory in Sublime Text

I’ve recently switched to development in two Vagrant virtual machines (VMs), one VM running Nginx and one running Apache. This means that are two locations I might need to open files from, with two sets of directories representing the document roots of my various development sites. Eventually I got bored of using the terminal to “subl ~/Vagrants/nginx/www/wordpress-whatever/” and decided to write an Alfred Workflow. Now I just trigger Alfred, hit “v client“, and Alfred shows me all my projects in directories with “client” in the name. Continue reading