A collection of articles and snippets I've collected over the years.

You may need to re-run your boot loader[grub]

February 19, 2015

After updating an Ubuntu server I occasionally see the message `you may need to re-run your boot loader[grub]` after updating the kernel. Here's how to actually update Grub.

Exim Command Cheat Sheet

February 13, 2015

I've had this Exim command cheat sheet in Evernote for a while and thought it would prove useful to others.

Using different PHP versions on OSX with Apache and Homebrew

February 4, 2015

By default Apple's OSX (Mavericks) comes with PHP 5.4 installed but if you want to work on a different version you're pretty stuck. My solution to this is to use homebrew to install PHP5.3, 5.4, 5.5...

Sample xdebug.ini file

January 28, 2015

I use Xdebug when working on PHP websites and often have to manually install it before starting and debugging. I usually find myself searching the internet for a sample xdebug.ini file to use after...

How to forward a domain to a Vagrant VM with Apache on OSX

January 27, 2015

I do a lot of my development work using Virtual Machines and Vagrant. This provides an easy way for me to get a working environment up and running locally on the many projects I work on daily....

Using a Standing Desk for Work: Week 1

January 19, 2015

Its been a week since my post last week, "Using a standing desk for work: Day 1" so I thought I'd write a update.

Using a Standing Desk for Work: Day 1

January 13, 2015

We've been toying with the idea of using a standing desk for work quite a while after we had read about them on the internet. The benefits of using them are still unproven but after experiencing...

Scriptaculous Ajax Autocomplete callback example

December 6, 2014

Recently, whilst working on an old website at work, I found a need to add additional parameters to a Ajax.autocomplete call The documentation show that this is possible via the...

Apache htaccess password authentication, optimisation, and caching

November 30, 2014

Just some Apache configuration stuff.

Job Control Commands: fg, bg and ctrl-z

September 16, 2014

I have a script polling a Beanstalkd queue and needed to put it into the background, and bring it to the front whilst debugging it.

Fix for MySQL error Code 1217 – A foreign key constraint fails

August 13, 2014

If you're trying to update or drop a table in MySQL and you're getting the error 'Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails' you need to toggle the...

Inspecting jQuery event handlers

August 5, 2014

Ever had issues finding where a JQuery click handler is defined? Got a project with LOTS of Javascript and can't find where an event is handled? Here's how to find out using Google Chrome. 1. Inspect...

Grep Apache access log for browser and OS version

June 5, 2014

Today I've needed to find out if it was worth testing a client's website with Safari 5 on Windows. Here's some shell foo to find out from an access log

Install NodeJS and Bower on Ubuntu 12.04 Precise

April 29, 2014

I'm using Bower on a few projects at work to manage the JavaScript dependencies and it works perfectly for my needs. The only issue is that the websites are currently deployed on Ubuntu 12.04 and the...

Ignore PHP Strict Errors and Warnings

March 31, 2014

After upgrading to PHP5.4 on one of our older code-bases I'm finding the error logs full of PHP Strict Errors and warnings. As this code is old and not financially viable to fix all these issues I...

How I use Git for Web Development

March 13, 2014

I have a few steps I usually follow when I find myself working on one of these websites so here's how I use Git with Web Development.