Articles
A collection of articles and snippets I've collected over the years.
Quick Tip: PHPstorm Find and Replace Regex Dollar Sign ($)
March 1, 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
Fix for PHP ‘ Warning: Invalid argument supplied for foreach() in …’
February 14, 2014
Whilst working on a legacy project* at work I'm getting lots of pages with the PHP warning "Warning: Invalid argument supplied for foreach() in ...". The warning is showing because I like to develop...
Can’t find VirtualBox Guest Additions ISO?
February 13, 2014
Can't find the VirtualBox Guest Additions ISO? Here's a link to the VirtualBox downloads server.
Why NPR’s intern didn’t like Public Enemy’s ‘It Takes A Nation Of Millions To Hold Us Back’
January 23, 2014
Today I read a well written blog post over at NPR Music called ‘You’ve never heard Public Enemy’s ‘It Takes a Nation of Millions To Hold Us Back’ in which one of their young interns, Austin...
Raspberry Pi with XBMC, Composite-Video and PAL
January 16, 2014
Tonight I have set up my Raspberry Pi with XBMC, S-Video and PAL mode. There were a couple of hurdles to get over but it's working fine now.
My Musical Journey: From Glam Rock to Hip-Hop (and Beyond) – Part Two
January 8, 2014
So the 1980s had introduced me to Hip-Hop - a new, exciting and fresh sound straight from the USA and I loved it. But there was a new buzz growing in the UK at the time and I'll admit that I hated it...
My Musical Journey: From Glam Rock to Hip-Hop (and Beyond) – Part One
November 10, 2013
I seem to have been born at a pretty good time for music. My parents aren’t big music fans; my Mother used to be into Glam Rock and bits of Hendrix whilst my Father used to play Country music on...
How to configure postfix to deliver all mail to one mailbox
October 19, 2013
How to configure postfix to deliver all mail to a local user account
Filter Apache logs to exclude js, css and images
August 7, 2013
Quite often I find myself having to filter Apache logs to exclude JS, CSS and images. I use a combination of cat and egrep to achieve this.
MySQL Create Database with UTF8 Character Set Syntax
June 21, 2013
I always forget the MySQL create database with UTF8 character set syntax, so here it is.
Vagrant, PHP and PuPHPet
May 21, 2013
I've been a PHP Web Developer for a long long time and have spent many hours setting up development environments in order to practice my trade. From full blown towers running full cdrom...
PHP imagick ImagickException no decode delegate for postscript or PDF files
May 17, 2013
This morning I had an issue with a PHP imagick ImagickException when converting a PDF/postscript file to a thumbnail. I have PHP Imagick, Imagemagick and Ghostscript installed and everything...
Magento admin login problem in Chrome – with solution
April 10, 2013
Recently I've been experiencing a Magento admin login problem in Chrome. The problem is that when I enter the correct username and password on the Magento admin login screen it simply returns back to...
Formula One Website Performance: The fastest team Is…
March 30, 2013
Formula one is the pinnacle of motorport. We know the cars are fast and the pace of development is relentless, but when it comes to performance how do the teams websites compare?
Routing requests to index.php with Apache
March 25, 2013
Here's how to go about routing requests to index.php with Apache. I'm always having to search for this online so I thought I'd document it here. Many of the 'modern' PHP applications use index.php as...
PHP backtick gotcha
March 12, 2013
This PHP Snippet caught me out today: ```php <?php $data = array(<code>paswd</code> => 'test'); print_r($data); ```` Notice the backticks around the array key? These automatically try executing...