Pragmatism in the real world

Automatic Apache vhosts

One thing that I've wanted to implement for a while now is automatic vhosts on my dev box. The idea is that I want to drop a folder into a directory and have it automatically turned into a vhost for me accessible at http://foldername.dev. It turns out that this isn't nearly as hard as expected which is usually the case with things that I've been putting off! This is how to do it. Apache configuration… continue reading.

OS X Tips and Tricks

It's been around 18 months since I wrote up some notes about OS X, so clearly it's time for an updated article. This article is intended to give a quick and easy introduction to some key things that I think you should know when you move to using OS X. Basics There's one menu bar for all applications. That is, you can only see the menus for the currently active application. Closing the last window… continue reading.

OS X Tips and Tricks for Snow Leopard

Following some discussions with friends who've recently started using OS X, I thought I'd note down some tips and tricks that I've learnt since I moved to Mac. This is in no particular order as it's taken from IRC logs of conversations I've had :) Basics There's one menu bar for all application Closing the last window doesn't exit the application. Use cmd+q or the Quit menu item on the "application name" menu. System Preferences… continue reading.

Changing OS X Terminal colours when ssh'ing into a server

I recently discovered that iTerm has bookmarks so you can set up a bookmark to ssh into a server and change the colours of the window. This makes it easy to remember which terminal window is for which server. Thinking about it, I wondered if you could change the colours of the standard OS X Terminal via AppleScript. Inpired by Red Sweater's Random Color Terminal post, I wrote some code to automatically change the Terminal… continue reading.

Uninstalling MySQL on Mac OS X Leopard

To uninstall MySQL and completely remove it (including all databases) from your Mac do the following: Use mysqldump to backup your databases to text files! Stop the database server sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* edit /etc/hostconfig and remove the line MYSQLCOM=-YES- rm -rf ~/Library/PreferencePanes/My* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm -rf /private/var/db/receipts/*mysql* The last three lines are particularly important as otherwise,… continue reading.

svn and case-insentive file systems

Another one to chalk up to a doh! moment… I'm checking out my wife's website to my new MacBook and get this error message: svn: In directory 'website/gallery/piccies' svn: Can't move source to dest svn: Can't move 'website/gallery/piccies/.svn/tmp/prop-base/IMG_0013-thumb.jpg.svn-base' to 'website/gallery/piccies/.svn/prop-base/IMG_0013-thumb.jpg.svn-base': No such file or directory I'm pretty sure that there's no problem with the subversion repository as I've been using it for months with no problem so I asked a friend to check it out… continue reading.

The move to Mac

A couple of days after Leopard came out, my wife and I found ourselves in the Apple store in Solihull and came away with an iMac for her and a MacBook Pro for me. The main reasons we have been interested in Macs recently are: Disappointed with Vista on my wife's brand new computer Disappointed with our last two Inspiron laptops Sleep that works The hardware looks good! Unix in the terminal Interestingly, the biggest… continue reading.

Do it before goddamned breakfast

jwz on 29th Oct 2007: When (WHEN) your backup drive goes bad, which you will notice because your last backup failed, replace it immediately. This is your number one priority. Don't wait until the weekend when you have time, do it now, before you so much as touch your computer again. Do it before goddamned breakfast. The universe tends toward maximum irony. Don't push it. Some very good advice. I just back up my "cannot… continue reading.