/kb

personal knowledgebase

Archive for the ‘mac’ tag

Install PIL (Python Imaging Library) in Leopard

without comments

Installing modules when using pip, virtualenv and virtualenvwrapper is a breeze, but it took some time before I realized what was the easiest way to install PIL.

I do it this way:

pip -E PATH_TO_VIRTUALENV install http://dist.repoze.org/PIL-1.1.6.tar.gz

This installs a slightly repackaged version of PIL. The latest PIL version is 1.1.7, but as far as I know it’s not available in this form.

Written by hgrimelid

February 7th, 2010 at 1:09 pm

Posted in Programming

Tagged with , , , , ,

Exclude several files or directories from tar

without comments

It’s very useful to be able to exclude certain files or directories when using tar. Here’s how I did in Leopard:

tar czvf FILENAME.tgz --exclude={.svn,wiki*,static} FILES_OR_DIRS_TO_TAR

Written by hgrimelid

August 9th, 2009 at 4:08 pm

Posted in Shell

Tagged with , , ,

Passwordless login with MacFusion

without comments

Put a reference to the private key file in ~/.ssh/config, for example:

IdentityFile ~/.ssh/id_rsa

Source: FAQS.org

Written by hgrimelid

August 6th, 2009 at 9:28 am

Posted in Server

Tagged with , , , ,

Make SSHKeychain work in Leopard

without comments

Here’s how I set up SSHKeychain on my Mac:

  1. Modify the package content as described
  2. Add stuff to .bashrc/.profile
  3. Add keys to SSHKeychain: Preferences > SSH Keys
  4. Check Manage (and modify) global environment variables (this probably has no effect, ref 2.)

Written by hgrimelid

June 22nd, 2009 at 10:43 am

Posted in Shell

Tagged with , , , ,

Open Finder for current directory from command line

with 3 comments

I just learned how to open a Finder window directly from the command line.

open .

Yes, it’s actually that easy, and the open command is quite handy some times. This is from the open man page.

The open command opens a file (or a directory or URL), just as if you had double-clicked the
file’s icon. If no application name is specified, the default application as determined via
LaunchServices is used to open the specified files.

This means that you can actually open anything from the command line with the open command. Go ahead and try it out!

Written by HÃ¥vard Grimelid

January 9th, 2009 at 9:41 am

Posted in Shell

Tagged with , ,