Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile
ENV_SUPATH PATH=/usr/local/ree-1.8.7-2010.02/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH PATH=/usr/local/ree-1.8.7-2010.02/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
:sunny:
:zap:
:leaves:
:lipstick:
:cop:
:wheelchair:
:fish:
:hammer:
:moneybag:
:calling:
@tomkersten
tomkersten / nginx_example1.com config
Created February 23, 2011 05:40
/etc/init.d/unicorn_example1.com file used for restarting the herd associated w/ the example1.com application
# Mostly yanked from:
# http://bit.ly/nginx-unicorn-setup
upstream example1-herd {
# 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).
server unix:/tmp/example1.com.socket fail_timeout=0;
}
@tomkersten
tomkersten / gist:877672
Created March 19, 2011 18:07
Unicorn.rb file
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
app_dir = "/home/example1.com/website/"
worker_processes 2
working_directory app_dir
# Load app into the master before forking workers for super-fast
# worker spawn times
preload_app true
set wildmenu " turn on wild menu
set wildmode=list:longest,full
" Search for mkdCode and throw this in there where you like...I did on line 72
syn region mkdCode start=/^``[^`]*/ end=/[^`]*``.*/
" ----------------------------------------------------------------------------
" Terminal setup
" ----------------------------------------------------------------------------
set term=xterm-256color
set t_Co=256 "Set terminal to 256 colors
" ----------------------------------------------------------------------------
" Syntax highlighting
" ----------------------------------------------------------------------------
" ---------------------------------------------------------------------------
" Folding
" ---------------------------------------------------------------------------
set foldmethod=syntax " Syntax highlighting items specify folds
set foldtext=getline(v:foldstart) " Set text displayed in "foldbar" when code is folded
set fillchars=fold:\ " Fill foldline "empty space" with...empty spaces (instead of default "-" character)
set foldcolumn=1 " Sets width of "foldcolumn" on left of screen used to display foldstatus indicators
set foldlevel=1 " Folds below 1-level. Class/Module-level definitions expanded...all others folded by default
" 'open' folds with the space bar
@tomkersten
tomkersten / nginx.log
Created September 27, 2011 03:01
Why isn't this working?
# After shutting down the app servers, the clients (open browsers) get a dump
# of all messages which have been held back...and this is dumped out to the nginx log
2011/09/26 22:55:57 [error] 5042#0: *1 connect() failed (111: Connection refused) while
connecting to upstream, client: 204.51.3.162, server: somedomain.com, request:
"GET /stream/0D9A1580 HTTP/1.1", upstream: "http://127.0.0.1:5000/stream/0D9A1580",
host: "somedomain.com", referrer: "http://somedomain.com/tags/0D9A1580/"