Skip to content

Instantly share code, notes, and snippets.

View germanow's full-sized avatar
:octocat:

Ivan Hermanov germanow

:octocat:
View GitHub Profile
@jwo
jwo / nginx.conf
Created January 2, 2012 20:03
nginx config for unicorn
# you generally only need one nginx worker unless you're serving
# large amounts of static files which require blocking disk reads
worker_processes 1;
user nobody nogroup; # for systems with a "nogroup"
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
events {
worker_connections 1024;
@rkumar
rkumar / gist:445735
Created June 20, 2010 10:47
ruby's OptionParser to get subcommands
#!/usr/bin/env ruby -w
## Using ruby's standard OptionParser to get subcommand's in command line arguments
## Note you cannot do: opt.rb help command
## other options are commander, main, GLI, trollop...
# run it as
# ruby opt.rb --help
# ruby opt.rb foo --help
# ruby opt.rb foo -q
# etc