Skip to content

Instantly share code, notes, and snippets.

@buddy-sandidge
Created May 10, 2012 17:50
Show Gist options
  • Select an option

  • Save buddy-sandidge/2654725 to your computer and use it in GitHub Desktop.

Select an option

Save buddy-sandidge/2654725 to your computer and use it in GitHub Desktop.
make html5 boilerplate project
#!/usr/bin/env bash
experiment=$1
dir=~/experiments/$experiment
if [[ ! -d $dir ]]; then
mkdir $dir
git clone https://github.com/h5bp/html5-boilerplate.git $dir
cd $dir
rm -rf .git
git init
git add .
git commit -m "inital commit"
cd -
fi
tmux has-session -t $experiment
if [[ $? == 0 ]]; then
tmux attach -t $experiment
exit
fi
tmux new-session -s $experiment -n editor -d
tmux split-window -h -t $experiment
tmux new-window -n console -t $experiment
tmux split-window -h -t $experiment:2
tmux split-window -v -t $experiment:2
tmux send-keys -t $experiment:1.1 "cd $dir" C-m
tmux send-keys -t $experiment:1.1 "vim index.html" C-m
tmux send-keys -t $experiment:1.2 "cd $dir" C-m
tmux send-keys -t $experiment:1.2 "git status" C-m
tmux send-keys -t $experiment:2.1 "cd $dir" C-m
tmux send-keys -t $experiment:2.1 "python -m SimpleHTTPServer" C-m
tmux send-keys -t $experiment:2.2 "cd $dir" C-m
tmux send-keys -t $experiment:2.2 "livereload" C-m
tmux send-keys -t $experiment:2.3 "cd $dir" C-m
tmux select-window -t $experiment:1
tmux attach -t $experiment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment