Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created October 8, 2014 22:25
Show Gist options
  • Save joemsak/d83e1671f3082c6ee8a3 to your computer and use it in GitHub Desktop.
Save joemsak/d83e1671f3082c6ee8a3 to your computer and use it in GitHub Desktop.
tmux has-session -t jamby
if [ $? != 0 ]
then
tmux new-session -s jamby -n editor -d
tmux send-keys -t jamby 'cd ~/work/jamby' C-m
tmux send-keys -t jamby 'vim' C-m
tmux new-window -n server -t jamby
tmux send-keys -t jamby:2 'cd ~/work/jamby' C-m
tmux send-keys -t jamby:2 'git pull' C-m
tmux send-keys -t jamby:2 'bundle' C-m
tmux send-keys -t jamby:2 'rake db:migrate' C-m
tmux send-keys -t jamby:2 'rails s' C-m
tmux new-window -n git -t jamby
tmux send-keys -t jamby:3 'cd ~/work/jamby' C-m
tmux select-window -t jamby:1
fi
tmux attach -t jamby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment