Last active
August 29, 2015 13:58
-
-
Save Jan-Bart/10128357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File: ~/startDev.sh | |
function new_tab() { | |
TAB_NAME=$1 | |
COMMAND=$2 | |
osascript \ | |
-e "tell application \"Terminal\"" \ | |
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \ | |
-e "do script \"printf '\\\e]1;$TAB_NAME\\\a'; $COMMAND\" in front window" \ | |
-e "end tell" > /dev/null | |
} | |
new_tab "Redis" "redis-server" | |
new_tab "Mongo" "mongod --config /usr/local/etc/mongod.conf" | |
new_tab "Websockets" "cd ~/Sites/astad_nodejs_expressjs_app_websocket; git pull; nodemon" | |
new_tab "Notifications" "cd ~/Sites/astad_nodejs_expressjs_app_notification; git pull; nodemon" | |
new_tab "Assets" "cd ~/Sites/astad_nodejs_expressjs_app_upload; git pull; nodemon" | |
new_tab "Kanalen" "cd ~/Sites/astad_nodejs_expressjs_app_kanalen; git pull; nodemon" | |
new_tab "Documentatie" "cd ~/Sites/nodejs_expressjs_site_documentation; git pull; npm start" | |
new_tab "Kalender" "cd ~/Sites/astad_nodejs_expressjs_app_kalender; git pull; nodemon" | |
#new_tab "Ophaalkalender" "cd ~//Sites/astad_nodejs_expressjs_app_ophaalkalender; git pull; nodemon" | |
#new_tab "Stadsmap" "cd ~/Sites/astad_nodejs_expressjs_app_stadsmap; git pull; nodemon" | |
new_tab "Contactboek" "cd ~/Sites/astad_nodejs_expressjs_app_contactboek; git pull; nodemon" | |
#printf '\\\e]1;$TAB_NAME\\\a'; npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment