Mac and Google two-factor authentication

OK, this is my Arghhhhh! of the day.

Some time ago I enabled two-factor authentication for my Google accounts - this is generally a good idea in this brave new world of Chinese hackers and botnets. In short, a hacker would need not only my password, but also my cellphone (and the password for that) in order to hack my Google accounts.

Git suddenly starts asking for ssh passphrase

Today, I tried a "git pull" from a github repo, and to my surprise, was prompted to enter my SSH passphrase for my key. Normally, I don't have to type anything - that's the beauty of SSH keys.

After mucking about far too long, I finally realized that this meant that the ssh-agent process on my Mac had died. Unfortunately, there seems to be no easy way to restart this from the command line (see this post). So, much to my chagrin, I rebooted my Mac. Damn, it's almost like having to use Windows.

Fortunately, rebooting reset whatever was going on with ssh-agent, and git started working properly again. Whew.

Setting up a Persistent Ramdisk on MacOS X 10.6

Using a ramdisk can significantly improve the performance of many disk-intensive applications. In this post I'll describe how to set up a ramdisk for MacOS X 10.6, which will persist across system sleep and wakeups, and even reboots.

Note: 22-Mar-2011: I've updated this article with some significant improvements.

I was motivated to look into this while running unit tests for Drupal development. This is a very database intensive operation, and running a full suite of tests takes many hours on a typical laptop. This is a perfect situation for deploying a ramdisk.

Setting up a Ramdisk

A little bit of googling led to this page, which describes how to set up a ramdisk for MacOS 10.6 (and 10.4/10.5, which I won't discuss here). This worked beautifully. Here's how to set up the Ramdisk:

Subscribe to RSS - MacOS X