My Vagrant VM base box only has en_US.UTF-8 installed by default and I recently required en_GB.UTF-8. So I created this chef cookbook to install the locale automatically. It has the ability to take an array of locales via the default[:localegen][:lang] attribute. Continue reading
Using :nth-child and .index() together in jQuery
I had a difficult scenario today. I was working on a site which someone else had created. To make it more of a challenge, I didn’t want to touch any of the HTML or CSS they had written. Instead, I wanted a pure javascript solution. In their CSS they were targeting the Nav elements via :nth-child. Continue reading
Vagrant and VirtualBox, modified files do not update when viewed in either NGINX or Apache
I recently got to grips with using Vagrant for web development. The VM environment I was able to create mirrors the one I created on our production servers at work. I also decided to go the whole-hog and create my own Debian Squeeze base box from scratch with the latest versions of VirtualBox Guest Additions, Ruby, OS updates etc. For a copy of it feel free to email me. Continue reading
Modern NGINX default server definition, with hostname automatically mapped to a directory
When I first decided to switch my primary web server from Lighttpd to NGINX I attempted to mimic the setup I had achieved in Lighttpd. As such, one of my first initial gripes with NGINX is that I had to create a new Virtual Host server definition for every new site I wished to add. What I really wanted was a default catch-all definition that mapped the hostname (without the www.) to a directory, while also retaining the ability to have additional site-specific definitions when needed. Continue reading
WordPress is rubbish…
…but all of a sudden I really wanted a blog and it has taken me < 5 minutes to set this up!
