public
Last active

This is how I bootstrap my envoironment. It's a small shellscript that will open a new tab and run the command past as argument to it.

  • Download Gist
init.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/bin/sh
 
# Credits goes to http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-window#answer-7911097
# I just slightly modified it to take an argument.
 
new_tab() {
pwd=`pwd`
osascript -e "tell application \"Terminal\"" \
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \
-e "do script \"cd $pwd; clear; $1;\" in front window" \
-e "end tell"
> /dev/null
}
 
init(){
new_tab mongod
new_tab "redis-server /usr/local/etc/redis.conf"
new_tab "foreman start"
new_tab spork
new_tab "rvmsudo passenger start -p 80 --user=<username>"
}
 
#BOOM!
init

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.