Basic use of ‘screen’

25/02/2010

Using screen is a great way to leave long-running processes churning away when you’re not logged into the machine.

Open a new screen

screen

Detach from the screen

This does not interrupt whatever is running in the screen.

Press Ctrl-A then D.

Reattach to a screen you’ve already opened

screen -r

If you’ve opened multiple screens, a list will be displayed:

There are several suitable screens on:
	1681.ttys004.braeburn	(Detached)
	1686.ttys004.braeburn	(Detached)

Just use the process ID of the screen to resume the right one:

screen -r 1681
No Comments

Installing the mysql gem on OS X Leopard

3/02/2009

First make sure you have the MySQL client libraries installed, then:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Source: http://weblog.rubyonrails.com/2007/10/26/today-is-leopard-day

No Comments

Flush DNS cache on OS X

27/08/2008
dscacheutil -flushcache
No Comments

Coloured bash prompt in OS X

7/05/2008

Pop this into /etc/bashrc for a green and blue one…

export PS1="\[\e[32;1m\]\u@\h:\[\e[34;1m\]\w\[\e[0m\]$ "

More colour codes here: http://blog.infinitered.com/entries/show/6

No Comments