Category Archives: Apple

Adding a SATA II SSD to an old Macbook & Creating a Snow Leopard bootable USB drive

The hard-disk in my sisters Macbook laptop finally emitted it’s last death rattle and shuffled off to silicon heaven so I found myself needing to install Snow Leopard (it’s too old for Lion) on a new disk drive. This was complicated by two factors.

  1. The Macbook is old, it only has a SATA (not SATA II) disk controller.
  2. The DVD drive had also died a long time ago.

I had read that SATA II disks sometimes worked on SATA controllers, but also a number of reports that the Macbook didn’t recognise some SATA II disks. I took a risk and bought an OCZ Vertex 2 60GB SSD¬†from Amazon. So far the Macbook has recognised it. This was the easy bit.

Next I needed to install Snow Leopard. This was going to be harder (I thought) because the DVD drive in the machine was broken. I checked a bunch of tutorials on the Internet on how to create a Snow Leopard install USB drive but most assumed the USB drive would be created on Snow Leopard itself (I’m using Lion) and included a fairly large number of steps.

I gave up on these guides and decided to do it freestyle and it turned out to be incredibly simple. Here’s how in-case someone ever needs to do this in the future.

  1. First, I inserted my Snow Leopard DVD into my Mac and the USB drive into a USB port.
  2. Next I formatted the USB key as Mac OS Extended (Journaled) using Disk Utility ensuring it had a Master Boot Record.
  3. Finally I restored the Snow Leopard DVD to the USB key again using Disk Utility.

That was it. I tried it out on my sisters Macbook and it booted from it just fine and is now installing Snow Leopard on the OCZ SSD.

Really Small Monitor

I recently got an iPad to ease my imminent travels, the (alleged) 10 hours of video and the ability to store a load of books will make the long plane journeys and layovers much more tolerable. The other big benefit is that when I get to where I am going I will be able to use it as a second monitor for my laptop.

Caius had previously suggested AirDisplay, an app that as it’s name suggests lets you use it as a wireless display for your computer (Mac and Windows) as long as they are both on the same wireless network. I bought it almost as soon as I got my iPad and tried it out in a coffee-shop. Throughout the day I used it for terminals and my Limechat IRC client and it worked well, staying connected almost continuously. The display updates fast enough for those simple uses, but stutters on web-page scrolling (though it’s still usable) and would be useless for video. Here’s a picture of it with a Textmate window dragged onto it:

AirDisplay is definitely worth a go if you travel with a laptop and like to have a second monitor. It seems to be a bit fussy with wireless networks though, I had no problems with a mifi wireless network and my 802.11n home network, but it wasn’t happy with my dad’s wireless network, it took ages to get it to connect and it got disconnected a fair few times. It also works on an iPhone if you’re really desperate:

Tagged ,

Setting custom request headers with objective resource

For the last few evenings I have been working on a native Mac app for Staging that talks to a Rails restful API. Rather than write the code access the resource URLs myself I thought it would be pretty cool to use Objective Resource, the Objective-c library for accessing Rails-style restful APIs, from the site:

ObjectiveResource is an Objective-C port of Ruby on Rails’¬†ActiveResource. It provides a way to serialize objects to and from Rails’ standard RESTful web-services (via XML or JSON) and handles much of the complexity involved with invoking web-services of any language from the iPhone.

There are a couple of problems with this approach however. First ObjectiveResource is designed to work on iOS (iPhones, iPod touches and iPads) only, and second it expects access to be controlled by a username and password. The API for Staging uses an X-API-Token HTTP header sent with each request.

Getting ObjectiveResource to work on native Mac

This was pretty simple, just replace all instances of

#import <UIKit/UIKit.h>


#import <AppKit/AppKit.h>

So far nothing has broken.

Getting ObjectiveResource to send a custom header

This was a little trickier and required some more invasive code changes. In Connection.h declare two new methods:

And define them in Connection.m:

Next you need to modify the request that gets called for every GET request:

The addition here is basically a for loop to loop over every header that we have configured and add them to the request object. Finally somewhere before you make any requests in your code:

Done! Now every request that GETs made will have the custom header sent along with it. You can obviously set any number of arbitrary headers using this method too, you aren’t limited to my X-API-Token. It is left as an exercise to the reader to implement the same for POST requests.

It would be nice to see these changes rolled into the ObjectiveResource framework in some way.

Tagged , ,

Q. Does GTA San Andreas work on a MacBook Pro using WinXP and Boot Camp?

A. Yes it does, perfectly and at the highest detail level.


SurveillanceSaver is awesome:

SurveillanceSaver is an OS X screensaver that shows live images of over 600 network surveillance cameras worldwide. a haunting live soap opera.

OS X screen grab keyboard shortcut

According to this page:

“Command-Shift-3 shortcut for taking a screen capture of your entire screen”

Useful, but even better:

“Command-Shift-4, … gives you a crosshair cursor so you can choose which area of the screen you want to capture.”

That is really great. There are a couple of other options for saving the screen grab to the clipboard instead of the desktop.