- Some utilities:
sudo apt-get install vim tmux git- Copy/paste from the command line:
sudo apt-get install xclip| # for more info: https://gist.github.com/1120938 |
| require 'rubygems' | |
| require 'erb' | |
| require 'sinatra' | |
| require 'dropbox' | |
| configure do | |
| enable :sessions | |
| end | |
| def authed? |
| # as we’re going to use Unicorn as the application server | |
| # we’re not going to use common sockets | |
| # but Unix sockets for faster communication | |
| upstream shop { | |
| # fail_timeout=0 means we always retry an upstream even if it failed | |
| # to return a good HTTP response (in case the Unicorn master nukes a | |
| # single worker for timing out). | |
| # for UNIX domain socket setups: | |
| server unix:/tmp/shop.socket fail_timeout=0; |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: unicorn | |
| # Required-Start: $local_fs $remote_fs $network $syslog | |
| # Required-Stop: $local_fs $remote_fs $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the unicorn web server | |
| # Description: starts unicorn |