Skip to content

Instantly share code, notes, and snippets.

@sashadev-sky
Last active April 29, 2022 22:36
Show Gist options
  • Save sashadev-sky/824e2b5d8f8bb048a0dbb464112902b8 to your computer and use it in GitHub Desktop.
Save sashadev-sky/824e2b5d8f8bb048a0dbb464112902b8 to your computer and use it in GitHub Desktop.
Setup Workflow Service quickly using Mac Terminal
#!/bin/bash
tabname() {
printf "\e]1;$1\a"
}
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
}
function setup () {
if [ $TERM_PROGRAM = "Apple_Terminal" ]; then
sleep 10
new_tab "mongo: cluster" "run-rs -k -m -p 27018"
sleep 3
new_tab "express: dev server" "npm run start-server:dev"
sleep 3
new_tab "react: client server" "npm run start-client"
sleep 3
new_tab "heroku process" "npm run build && heroku local"
fi
}
setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment