Escape characters in the PHP date function

It’s funny when you’ve been programming in a language for a long time and fall into odd assumptions about particular functions. For some reason I appear to have assumed there was no way to escape characters in PHP’s date function. Then yesterday I saw some sample code where a character was escaped and double checked in the manual. Sure enough, you can escape characters and it’s obvious. I just thought I’d share it here in case you’re making the same mistake I was.

Categories PHP

Set file extension associations with Aptana Studio 3

I’ve started using Aptana Studio 3 to try it out for a while and compare it with Netbeans because Netbeans is such a memory hog (although Aptana seems to be a CPU hog instead so far). This post shows how to set up a custom file extension association in Aptana Studio 3. The screenshots are from the Mac version but should be the same for other platforms too.

List stored procedures in MySQL

This post shows how to get a complete list of stored procedures in a MySQL database and then to see what code is used in the stored procedure.

How to disable spotlight indexing on Mac OSX

Spotlight is a useful Mac app for launching apps, finding files and other stuff on your computer, and a whole bunch of other nifty little things. Since upgrading to Lion I’ve been finding it doing some serious CPU hogging for long periods of time while it updates its index, and because I use very few of the features I decided to switch Spotlight’s indexing off.

Categories OSX

How to find and replace text in a MySQL database

There are a few posts on this blog about the Facebox jQuery plugin, and as I discovered this morning the website URL for the plugin has changed so I needed to update all links to it. The quickest way to do this was to update the MySQL database directly using UPDATE and REPLACE to find the old URLs and replace them with the new URLs. So here’s how to find and replace text in a MySQL database.