Getting down to coding faster

When I reboot my mac, or need to switch projects, I had quite a few clicks and mouse movements to go through. I found it rather repetitive, so I set up a shell script (in ruby) to open Firefox, Textmate, and start the rails server.

Here’s the script. I called it open_dev_environement and used chmod 755 open_dev_environment to make it clickable and executable from the project directory.

# make sure your path to ruby is the same as above by typing 'which ruby' at the command line
app_directory_name = "persfin"

# start mongrel, using -c to change the directory
system 'mongrel_rails mongrel::start -c ~/Sites/' + app_directory_name + '&'

# change Minefield to Firefox if you're not using the latest Firefox Nightly Beta
`open -a /Applications/Minefield.app http://localhost:3000`

# make sure your textmate project file has the same name as the directory
system 'open -a TextMate ~/Sites/' + app_directory_name + "/" + app_directory_name + ".tmproj"

It would be interesting to know how to extend this to open up multiple tabs in Terminal (for example, ’script/console’) Or, if there is a better way to do these commands with osascript for applescript. If you know, let us all know in the comments.
see also Ruby may replace Applescript.

Tags: , ,

One Response to “Getting down to coding faster”

  1. has Says:
    April 4th, 2008 at 1:38 pm

Leave a Reply

My Web Host

Twizeets!

  • @comcastcares I am trying to sign up for internet website offers me $19.95, chat says it's not available for me, that's bait and switch 15 hrs ago
  • Pinot noir barrel aged Belgian ale, Natty Red, and stuffed boomers on the menu. (@ Hop Valley Brewing) http://4sq.com/9xx7Rn 3 days ago
  • We're home in SF, but it's the last 36 hours living here before we move to Seattle! 6 days ago
  • Qik.com/ivanoats 1 week ago
  • Anyone use @statefarm in Seattle and like their agent? BTW, Ken Bullock in Oakland has been great over the years here. 1 week ago
  • More updates...

Posting tweet...

Powered by Twitter Tools

Subscribe

  • Subscribe via Feed Burner
  • Subscribe in Yahoo
  • Add to Google
  • Add to My AOL

Community

Already a member?
Login
Login using Facebook:
Last visitors
Powered by Sociable!

My Travels


About Me

I am an eco geek.

My interests include mentoring ecopreneurs, technology coaching, programming, web hosting, and sustainable marketing.

I am available for hire for your website design/build projects including WordPress and Ruby on Rails web applications.

I also write on my company's green web hosting blog.

Chat with me


click-to-call from the web

Google Friend Connect

Flickr


By Erik Rasmussen

My Music