How to copy the OSX Lion installer to prevent multiple downloads

Apple’s OSX Lion upgrade is available from the App store as an almost 4GB download, and a single purchase can update all your computers running Snow Leopard. My concern was that I didn’t want to have to download it twice for each Mac I have, but fortunately it’s very easy to make a copy after …

Read more

Categories OSX

Embed literal text in PHP date format strings

The tip offered in this post is actually documented in date page of the PHP manual but it’s one of those things I wasn’t aware of until seeing it in an example somewhere else just before posting this so I thought I would share it here. It’s how to embed some literal text in the …

Read more

Categories PHP

Check if a MySQL table exists

MySQL has a couple of ways (that I know of, there may be more) of working out if a table exists. This post looks at how to check if a table exists in the MySQL database. Using show tables The first way is using the “show tables” function. If your database (called “test” in this …

Read more

Add the RPMForge custom repository to CentOS

The RPMForge custom repository has a lot of useful software applications for CentOS and Red Hat Enterprise Linux which aren’t included in the default repositories. This post looks at how to enable it. First of all go to http://dag.wieers.com/rpm/packages/rpmforge-release/ to work out which package you need to install. It has RPM packages for Red Hat …

Read more