Password less SVN on Mac OS

It's pain to enter password tens of times when doing "svn up", "svn ci" on your own computer everyday. To make everything simpler:

$ ssh-keygen -t dsa 
$ ssh {user}@{server}
server$ mkdir ~/.ssh 
server$ touch ~/.ssh/authorized_keys2     
server$ chmod go-rw -R .ssh
server$ exit
$ ssh {user}@{server} 'cat >> ~/.ssh/authorized_keys2' < ~/.ssh/id_dsa.pub
$ ssh {user}@{server}                      

There you go, if you follow all these steps, you should be able to login with out a password.

Posted by Shaokun 18 Feb 2008 at 03:39PM


Textmate script to restart mongrel

I often find myself needing to restart the rails app I am working on while in Textmate. Sure, its easy enough to switch to a terminal window and hit up-arrow, but since Textmate is a wonderfully developer friendly app, I decided to see what I could do about automating a common task.

In Textmate go to Bundles → Bundle Editor → Edit Commands

Use the + at the bottom to create a new Command

This gives you a blank template for a new command. The command editor gives you control over several aspects of your current working document and project. Since this is an app restart for development purposes, I choose to save all files before executing the command. Then, I just put in a few shell commands that will be executed directly. I like to do a clean restart so that the same script works even if this is the first time starting it up:

<pre> echo "Restarting the App..." cd "$TM_PROJECT_DIRECTORY" mongrel_rails stop mongrel_rails start -d -p4040 </pre>

This command takes no input, and puts the output into a tooltip. Finally, I need to select a key combination. cmd-R is taken, so I settled on cmd-G (for GO!).

That’s it. My very own custom command in Textmate in under 5 min. I leave the “Stop App” command as an exercise for the user.

Posted by adevadeh 03 Dec 2007 at 10:40PM



>