Mac OS: Lock screen with keyboard shortcut

When I step away from my Mac at work, I want a quick way to lock the screen, and hitting a hot-corner with the mouse is problematic for me. This hint details how to lock the screen from the keyboard by using Automator to build a Service in Snow Leopard.

First, check the General tab on the Security System Preferences panel to ensure that the Require password [some period] after sleep or screen saver begins box is checked.

Read More »

Install MongoDB on Snow Leopard

I have to install MongoDB on a Linode server with Ubuntu 10.04. So I decided to install it on my MBP first. It’s a cool little database, and John Nunemaker’s MongoMapper gem is a treat.

Here’s how I got the server installed and running as a daemon in Snow Leopard for local development.

Download, unpack, and install the pre-compiled 32-bit binaries:

curl -O http://downloads.mongodb.org/osx/mongodb-osx-i386-1.4.0.tgz
tar xzf mongodb-osx-i386-1.4.0.tgz
sudo mv mongodb-osx-i386-1.4.0 /usr/local/mongodb
sudo mkdir /usr/local/mongodb_data /var/log/mongodb
sudo chown -R root /usr/local/mongodb

(If you’re on a 64-bit machine, substitute in x86_64 for each i386 above.)

Read More »

MySQL 5.5.8 can’t start automatically on Mac OS 10.6.6

After resolving the problem of MySQL and mysql gem I got another problem: MySQL 5.5.8 didn’t start automatically when I boot my computer.

Don’t be serious, you can fix it easily by modifying mysql.server file.
Open /usr/local/mysql/support-files/mysql.server with your favorite text editor, locate the configuration of basedir= and datadir=, change them to:

basedir=/usr/local/mysql
datadir=/usr/local/mysql/data

and the problem gone, your MySQL server now starts automatically everytime you boot the computer.

now you can start the MySQL server manually (no need to reboot) by this command:

Read More »