My public PGP key

November 18, 2014

Here’s my PGP key. You can verify it’s me here:

Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools -


This is a step-by-step guide for installing a new internal SSD drive on a 13 inch, mid-2010 Macbook Pro. It’s a slightly modified version of the OWC guide.

  • Check your Mac is compatible – it should be a “Mid-2009”, “Mid-2010”, “Early 2011,” “Late 2011” or “Mid-2012” MacBook Pro model. You can check it using Apple’s instructions here.
  • Buy the right stuff to do the job – you’ll need:1. An anti-static wristband to prevent damage to your laptops internals from stray anti-static sparks from your body. I went for this one from Maplin’s
    3. A #00 Phillips screwdriver and a T6 Torx screwdriver – I got my Phillips one here and the Torx one here (both from Amazon).
    3. Some way to connect up your SSD drive before you install it (so that you can format it and clone your data onto it) – You could use a drive enclosure, but I got this nifty Bipra tool to do the job (it can handle lots of different drive types).
    4. An appropriate SSD drive (2.5 inch internal) – I went for the Crucial 512GB M4 SATA 6Gb/s 2.5 SSD.

    • Once you have your new drive hook it up to your Macbook and clone the data from your drive onto it using this OWC guide. I used the Carbon Copy Cloner – it cloned 121GB in around 2 hours.
    • Test that your cloned drive can boot ok – Once you are happy follow the instructions on the OWC video to pop your new SSD into your Macbook. Don’t forget to put your anti-static wristband on first and attach it to an earthed source (I used a radiator downpipe) before tinkering

The inside should look something like this (the SSD drive is in the bottom left-hand corner)

Happy hacking !

It’s been over a year since my last blog post. Time has flown since then, and a lot has happened – I’ll cover the highlights in another post.

In the meantime I wanted to jot down some notes about Amazon Web Services, particularly around launching instances in other regions (mainly for my own benefit !) Amazon currently operates 3 “regions” each of which can be thought of as an individual “cloud” in it’s own right. The most recent came online in December in California.

I wanted to run one of our EC2 instances in this new region, but it wasn’t quite as straightforward as I’d hoped. A few people have mentioned problems about doing this but one post on the AWS dev site was very helpful.

Basically you have to migrate your AMI from one region to another before you can run it. To do this first launch an instance of the AMI you want to migrate in US-East, then on that instance run the following command (detailed help here):

ec2-migrate-bundle -k (your private key file) -c (your cert) -a (your access key) -s (your secret access key) --bucket (your source bucket) --manifest (your manifest filename) --location US --region us-west-1 --destination-bucket (destination bucket you want to create)

… then, on a local machine run:

ec2-register --region us-west-1 --name (your ami name) (your new manifest fullpath on us-west-1)

Note: You can of course use the AWS Console to register your AMI too.

Edit: Steve Reynolds posted a great followup focusing on how to do this in EC2.

stackSo my brother recently asked me how to best go about configuring a WAMP (Windows, Apache, MySQL, PHP) stack for production. I’m sure there’s a ton of things you should do, but here were some intial thoughts that sprang to mind. I may update the post with others as I think of them.

All of this applies to a single server environment, once you start scaling out different rules apply. Ideally your architecture should be designed so that you can scale horizontally though, so that if things do take off you don’t find yourself re-writing everything.

Feel free to add other tips in the comments …


  • Turn off uneccessary “stuff”
    Windows runs a bunch of services by default that you don’t need. Bin them. Especially the following:
    – Windows Firewall (will mess with your inbound/outbound traffic)
    – Indexing service (will thrash your hard drive trying to be “helpful”)
    – Any anti-virus services (use your discretion here, but generally they can cause a lot of unecessary disk activity.)
  • Sort the startup folder and app tray
    Blitz everything from the startup folder and app tray that isn’t absolutely necessary.


  • Grab the right copy
    Always get the most recent copy for bug fixes and features. At the time of writing v2.2 has some nice load-balancing configuration features for instance. Also, make sure you download the SSL-enabled version of http server, it may come in handy.
  • Set cache settings
    Take a look at the ExpiresActive and ExpiresByType config options to setup caching for your images and files that won’t change that much (css, js). This will make your site more performant in the eyes of the user and save you money on bandwith charges.
  • Sort out your logging
    In test mode you probably want LogLevel set to “debug”, in production you’ll want this at something like “warn” to avoid unecessary logfile activity. Also make sure you use CustomLog to grab all the info you can about your end users and rotatelogs to manage your logfiles.
  • Disable directory browsing
    An absolute must, see this howto.
  • Setup custom error pages
    Use the ErrorDocument directive to setup nicer looking error pages. They look better, and don’t give outyour sensitive environment info.
  • Enable compression
    It’s well worth doing and straightforward.


  • Write to a seperate disk
    Do data writes on a different disk to the webserver and application processing. You want to ensure that you don’t have disk contention issues.
  • Consider RAID
    If uptime is crucial consider implementing something like RAID 1 to mirror your data across multiple disks.
  • Backup the DB data
    Do this at least every 12 hours, using something like S3.
  • Tweak configuration options
    There are hundreds of config options for MySQL, probably worthy of a seperate post in their own right, but by far the most important is your upfront decision about which table-type to use, as it’s difficult to change afterwards. Check out this lowdown on some of the different options.


  • Enable extensions
    PHP works quite nicely out of the box, but remember to enable any extra extensions (the bits with “extension=” in your PHP.ini file)
  • Tweak post rules
    You might want to set the “post_max_size” variable if you’re accepting large (or want to limit) file uploads.

Miscellaneous musings

  • Consider S3 for storage
    Storage is hard. Doing it yourself is hard. If you’re doing it a lot let Amazon worry about it for you, by building on top of S3. In your application design it’s easier to bake this in upfront rather than retrofit it. And it’s cheap.

Bartlet for America

October 30, 2008

FIVE days from now the U.S. people will vote for their next President, the leader of The Free World. Forty five percent of his own countrymen will vote against him. He will carry the electoral college with 5 to 6 swing states. Media outlets will both laud and pound him. Bloggers will rejoice. Others will hate the sight of him. Some will plot to take him down. Many more across the world will see him as little more than a figurehead for a cabal of selfish modern day robber-barons, intent on peddling the new religion of consumerism, and all the foreign misadventures it entails.

We have a dim view of politics in the UK. Heck, we’ve had long enough to get cynical about it – we’ve had parliamentary representation for over 300 years, and enough dubious political figures to found a small colony (and many did). We rail about low pay, the state of the railways, the youth and Prescott’s Jag. We moan about a government out to tax us to death (and beyond), and the appalling state of our health service. We don’t choose to vote, but we like to have our say, even so.

We forget that most politicians don’t earn as much as the average Managing Director. They don’t get into politics for a cushy life, an easy ride. They do so to serve. To make a difference, to affect change in a hurting world, to step into the arena, not cower in the corner. We should treat them as heroes, not villains, applaud their commitment, their sacrifice, their service.

I for one still believe in a place called Hope. As Leo himself once said:

    “This is the most important thing I’ll ever do. I have to do it well.”

That’s what service is all about. Just ask Josiah Bartlet.

FOWA Day 2

October 10, 2008

Back at FOWA for day 2. Things feel a little bit more sombre this morning, maybe because the stock markets are tanking, and Tim Bray from Sun gave a pessimistic keynote about the future (more on that in a later post).

In the meantime here’s a gratuitous picture of a very fast server. I think this would look good in the living room at home:

Surfing at FOWA

October 9, 2008

So I’m at the Future of Web Apps conference in London today with Mike.

It looks even bigger & better than last year. Best moment so far was being first on the conference surfboard: