Writing
Howto's, snippets, and articles I've written over the years.
Install PHP 5.4 and Nginx on Ubuntu 12.04
February 13th, 2013Whilst the LAMP stack is easy to install (sudo tasksel & select 'LAMP'), installing PHP 5.4 and Nginx on Ubuntu 12.04 isn't as straightforward. For a start, the packaged Nginx is out of date and PHP5.4 isn't currently available at all out of the box. Luckily there are PPA's for installing PHP 5.4 and Nginx.
Developer Tools: Vim keyboard shortcuts
January 5th, 2013I regularly use Vim but have to confess that I'm not a 'power' user. To help me learn Vim keyboard shortcuts I have noted them down here.
Install PHP and Mysql on OSX Mountain Lion
December 19th, 2012Here's a useful snippet to help install PHP and MySQL on OSX Mountain Lion.
How to highlight keywords when using tail
October 16th, 2012Wouldn't it be really great if you could highlight a keyword or phrase when using `tail`? Here's How to do it.
Restart Apache on Mac OS X
October 15th, 2012This is here for reference as I keep forgetting how to restart apache on Mac OS X.
Change the cursor with JQuery
September 24th, 2012Occasionally I use JQueryUI components to display dialogs and I like to set the cursor to the 'timer' when the event is triggered and back to 'auto' afterwards. Here's how to change the cursor with JQuery.
Detect iPad and iPhone with PHP
July 25th, 2012If you ever have the need to detect iPad and iPhone with PHP, or any other mobile/tablet device, you can use the excellent php-mobile-detect library.
How to find the Magento version
July 11th, 2012Often you will need to know which version of Magento you are running in order to install an extension or apply a security patch. Heres how to find the Magento version you are running.
Gzip javascript and css with NGinx
June 29th, 2012Nginx by default will only compress text/html content types. Heres how to gzip javascript and css with NGinx.
Sending HTML Mail via SMTP with PHP Pear Mail
May 30th, 2012Here's how to send html email via remote SMTP using PHP and Pear Mail / Mime.
How to add APC cache to Magento
May 10th, 2012The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It can help speed up your Magento installations.