Skip to content

Instantly share code, notes, and snippets.

# This block requires the geo module, which enables the use of
# variables which depend on the IP address of the client.
#
# In this case, everyone outside of the 192.168.0.x network
# is considered an "external" client.
geo $external {
default 1;
192.168.0.0/24 0;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nginx</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/nginx/sbin/nginx</string>
<string>-g</string>
let g:path_to_matcher = "/usr/local/bin/matcher"
let g:ctrlp_max_files = 25000
let ctrlp_filter_greps = "".
\ "egrep -iv '\\.(" .
\ "jar|class|swp|swo|log|so|o|pyc|as|fla|swf|jpe?g|png|gif|mo|po|wav|zip" .
\ ")$' | " .
\ "egrep -v '^(\\./)?(.git/|.hg/|.svn/)'"
if has("unix")
unicorn_profiles="dev prod"
unicorn_dev_enable="yes"
unicorn_dev_user="devuser"
unicorn_dev_listen="/tmp/unicorn.dev.socket"
unicorn_dev_dir="/usr/local/www/dev"
unicorn_dev_config="/usr/local/www/dev/config.ru"
unicorn_dev_env="development"
unicorn_dev_flags="" # any additional flags
unicorn_dev_rails="YES" # For rails
@andreimaxim
andreimaxim / daemon.rb
Last active December 14, 2015 15:48 — forked from alinbsp/gist:5109459
require 'syslog'
require 'daemonize/version'
module Daemonize
APP_NAME = "ruby_daemon"
PID_FILE = APP_NAME + ".pid"
CWD = "."
# The code that will actually daemonize a process. It is
# based on the coding rules specified in the 13th chapter

ruby-1.9.3-p385 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@andreimaxim
andreimaxim / ree.sh
Created August 2, 2012 06:29
REE 1.8.7 on Mountain Lion
# Thanks Olly Smith! http://coderwall.com/p/fywjrw
brew tap homebrew/dupes
brew install apple-gcc42
# Requires XQuartz from http://xquartz.macosforge.org/landing/
CPPFLAGS=-I/opt/X11/include CC=/usr/local/bin/gcc-4.2 rbenv install ree-1.8.7-2012.02
@andreimaxim
andreimaxim / FREEWAYS
Created July 19, 2012 21:47
Kernel for a FreeBSD-based gateway.
#
# FREEWAYS -- Custom kernel configuration for a FreeBSD gateway/storage server
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
require "active_support"
class FooOne
def m; 1; end
end
class FooTwo # classy
def m; 1; end
end
@andreimaxim
andreimaxim / thin
Created December 22, 2011 08:38 — forked from sorah/thin
/etc/init.d/thin - thin init script with bundle exec. own your risk - public domain.
#!/bin/bash
DAEMON=/path/to/thin
BUNDLE=/path/to/bundle
CONFIG_PATH=/etc/thin
SCRIPT_NAME=/etc/init.d/thin
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0