start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash -ex | |
| # Assumes: | |
| # homebrew | |
| # chruby | |
| # ruby-install | |
| # postgres.app | |
| # this bit might not be necessary, but can't hurt | |
| brew upgrade ruby-install | 
| # Capistrano configuration | |
| # | |
| # require 'new_relic/recipes' - Newrelic notification about deployment | |
| # require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
| # set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
| # set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
| # "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
| # task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP | 
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| # Download the compiled elasticsearch rather than the source. | |
| wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share | 
| require 'sinatra/base' | |
| require 'rack/flash' | |
| require 'warden' | |
| require 'slim' | |
| require 'sequel' | |
| require 'sqlite3' | |
| DB = Sequel.sqlite | |
| DB.create_table :users do | |
| primary_key :id | 
| /*! | |
| * $.preload() function for jQuery – http://mths.be/preload | |
| * Preload images, CSS and JavaScript files without executing them | |
| * Script by Stoyan Stefanov – http://www.phpied.com/preload-cssjavascript-without-execution/ | |
| * Slightly rewritten by Mathias Bynens – http://mathiasbynens.be/ | |
| * Note that since this script relies on jQuery, the preloading process will not start until jQuery has finished loading. | |
| */ | |
| jQuery.preload = function(array) { | |
| var length = array.length, |