Skip to content

Instantly share code, notes, and snippets.

@bamorim
Created June 11, 2013 00:53
Show Gist options
  • Save bamorim/5753735 to your computer and use it in GitHub Desktop.
Save bamorim/5753735 to your computer and use it in GitHub Desktop.
#!/bin/bash
tmux start-server
if ! $(tmux has-session -t 'jukeruby'); then
cd $(dirname "${BASH_SOURCE[0]}")
cd jukeruby
tmux set-option -t 'jukeruby' default-path $(pwd)
tmux new-session -d -s 'jukeruby' -n 'JukeRuby'
tmux send-keys -t 'jukeruby:0' 'ruby discovery_server.rb' C-m
tmux split-window -t 'jukeruby'
tmux send-keys -t 'jukeruby:0' 'rackup' C-m
tmux split-window -h -t 'jukeruby'
tmux send-keys -t 'jukeruby:0' 'ruby jukeserver.rb' C-m
tmux select-pane -t 0
tmux split-window -h -t 'jukeruby'
tmux send-keys -t 'jukeruby:0' 'top' C-m
tmux select-pane -t 2
fi
tmux a -t 'jukeruby'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment