Cannot redeclare wpsc_register_post_types

I received the error "Cannot redeclare wpsc_register_post_types" while setting up a WordPress powered website to be used as a CMS. Everything was working locally but once I uploaded to the server I was continually getting the error around the wpsc_register_post_types function call. The first thing I tried was to deactivate the plugin which then caused an out of memory error when trying to allocate around 26mb of memory in wp-admin/menu.php.

List directory contents by modified date in php

At home we have quite a large collection of movies that have been collaborated over the years and are all stored on a central server. Every movie is stored in a unique folder along with some backdrop images and a xml file which stores information such as the movie title, description, production year and our own custom reviews. I wrote a C# application which allowed everybody to view all of this information easily and everything works well. But it didn't seem very helpful having a nice list of all the movies and their data unless you could view them in a newest to oldest order.

Change terminal color in Ubuntu for SSH sessions

Well I made the mistake of leaving an SSH session logged in at home and then when I came back to my laptop to shut it down I typed "sudo halt" and then realised I was still on the server and everyone who was accessing the server was kicked off.

Not so much fun and a bit of a ammeter mistake, my solution was to change the colour of my terminal login prompt when in a ssh session. I tend to ssh into my home server quite a lot so I have an alias in my .bashrc file. Your .bashrc file is run when you login.

Cannot load mysqli extension - WAMP Server

I started work this morning and when I went to access phpMyAdmin which is installed as part of the WAMP package on a Windows 7 box I got the error "Cannot load mysqli extension". I wasn't sure at first what could have caused it but I figured the obvious thing to do was to replace the extensions so I downloaded the PHP binaries and replaced the mysql and mysqli extensions in the WAMP installation but that didn't help. After a few minutes of thinking I remembered I had installed Zend Server the Friday before for some testing. The error is caused because Zend installs another php.ini file.

Gave up waiting for root device, Ubuntu 10.04 Netbook Remix

A few weeks ago a friend bought a new Toshiba NB300 laptop running Windows 7 Starter. He had bought it mainly to run Windows but decided with there been so much hardrive space (250GB) he may as well install Ubuntu and Windows side by side. We decided to give the netbook remix of Ubunut 10.04 a test drive of a live USB drive and after a quick play we decided we liked the slick user interface and to go ahead with the installation.

Rydges Melbourne /dev/world/2010

I have just returned from the 2010 /dev/world conference held at the Rydges in Melbourne. The event was a fantastic experience and offered me the chance to get a insight on a lot of what is happening in the Mac development community from some of the most talented developers in Australia. The event had over 20 guest speakers who spoke for a hour at a time over the two days. Three speeches were presented simultaneously offering a diverse amount of information for varying experience levels or different interests.

The three tracks offered were:

Invalid Property in Internet Explorer

I recently spent an hour trying to figure out why once piece of JavaScript code was working fine in FireFox but not in Internet Explorer.

When I eventually installed some IE JavaScript debugging tools and pinpointed the problem I was surprised to find that it was my used of a colours name. Apparently IE does not support grey as a colour and you must specifically give the hexadecimal colour value. It was only for testing that this code was been used but I learnt my lesson the hard way and will never again be using colour names.

Programmatically Rotate PDF Files

The Problem: A friend’s work photocopier continually scans files in with the wrong page orientation which is obviously both annoying and time consuming going through each PDF file changing the page orientation. After spending a few hours searching on Google I was unable to find a quick fix to this problem so my next stop was the adobe forums. A quick search their revealed a only one topic with someone posting about the exact same problem but other than a totally unhelpful reply from an Adobe employee saying look in the Acrobat API there was no solution.