Writing

Howto's, snippets, and articles I've written over the years.

Using a Standing Desk for Work: Week 1

January 19th, 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 13th, 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 back-ache, abdominal issues and muscular pain I tried using a makeshift setup to see if using a standing desk for work would improve things.

Scriptaculous Ajax Autocomplete callback example

December 6th, 2014

Recently, whilst working on an old website at work, I found a need to add additional parameters to a Script.aculo.us Ajax.autocomplete call The documentation show that this is possible via the callback function but unfortunately there isn't an example provided.

Apache htaccess password authentication, optimisation, and caching

November 30th, 2014

Here's a few Apache snippets for password authentication, allowing acces via an IP (else requesting password), optimising and caching assets, turning og PHP processing, and more.

Job Control Commands: fg, bg and ctrl-z

September 16th, 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.

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

August 13th, 2014

If you're getting the following from MySQL: 'Error Code: 1217. Cannot delete or update a parent row: a foreign key constraint fails' - this is how to fix it

Inspecting jQuery event handlers

August 5th, 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.

Grep Apache access log for browser and OS version

June 5th, 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 29th, 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 packaged version of NodeJs is too old to install Bower.

Ignore PHP Strict Errors and Warnings

March 31st, 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 needed to ignore the errors and warnings.

How I use Git for Web Development

March 13th, 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.

Quick Tip: PHPstorm Find and Replace Regex Dollar Sign ($)

March 1st, 2014

If you need to perform a Find and Replace with a Regex in PHPStorm and want to replace a dollar sign ($) you'll need to escape it with a double slash

Newer articles Older articles