Tuesday, July 1, 2008

Enable "single window mode" in Safari 3.1

It's about time Safari added this feature. Just do the following in the terminal:

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

NB: I've read complaints about this not working in the Safari 4 developer preview.

Thursday, June 26, 2008

setting up subversion over svn+ssh

Consolidating this process, so I don't forget it:

create user svn
lock svn account (sudo passwd -l svn)
sudo -u svn -s
go to /home/svn/
svnadmin create [repository directory here]
chmod g+s [repository directory]/db

URL of repository will be: svn+ssh://username@hostname/home/svn/[repository directory]

Be sure to follow these tips from the svn book:
  • All of your SSH users need to be able to read and write to the repository. Put all the SSH users into a single group. Make the repository wholly owned by that group, and set the group permissions to read/write.

  • Your users need to use a sane umask when accessing the repository. Make sure that svnserve (/usr/local/bin/svnserve, or wherever it lives in $PATH) is actually a wrapper script which sets umask 002 and executes the real svnserve binary. Take similar measures when using svnlook and svnadmin. Either run them with a sane umask, or wrap them as described above.

  • When BerkeleyDB creates new logfiles, they need to be owned by the group as well, so make sure you run chmod g+s on the repository's db directory.


The umask point can be accomplished by using scripts like this:
$ cat /usr/local/bin/svn

#!/bin/sh

umask 002
/usr/local/subversion/bin/svn "$@"

Tuesday, June 17, 2008

LockTight -- lock your computer with a shortcut

One of the frustrating things on the Mac is the lack of the ability to lock your computer with a simple keyboard shortcut.  Fortunately, there is a little program called LockTight which comes to the rescue.

Wednesday, May 28, 2008

Synchronize two directories (local or remote)

Found a neat utility called Unison which does two way synchronization between two directories (as opposed to rsync which AFAIK is only one way).  It seems much easier to use than rsync, as well.  You simply use a command like so 'unison /path/to/dir1 /path/to/dir2'.  If you want to sync with a remote directory, you can use ssh in the path specification (ssh://username@foo.org/path/to/dir/).

It works with Linux, Mac, Windows (I found it on MacPorts for the mac).

Friday, May 23, 2008

Wednesday, December 12, 2007

Strange results on live search

A friend of mine and I were messing around with live search, and we noticed some dubious sponsored links associated with certain keywords.