Skip to content

Instantly share code, notes, and snippets.

View tbartelmess's full-sized avatar
🐶
EventLoopFuture<Void>

Thomas Bartelmess tbartelmess

🐶
EventLoopFuture<Void>
View GitHub Profile
@rjeczalik
rjeczalik / building-static-nginx.txt
Created October 19, 2013 15:37
Notes on building nginx as a static binary.
# Building static nginx for teh lulz
#
# basic dependencies
sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev
# download nginx and openssl
wget http://nginx.org/download/nginx-1.5.6.tar.gz
tar xf nginx-1.5.6.tar.gz; cd nginx-1.5.6
@gaffneyc
gaffneyc / active_record_statsd.rb
Created November 16, 2012 16:47
Instrumenting ActiveRecord with StatsD
ActiveSupport::Notifications.subscribe("sql.active_record") do |name, start, finish, id, payload|
if payload[:sql] =~ /^\s*(SELECT|DELETE|INSERT|UPDATE) /
method = $1.downcase
table = nil
# Determine the table name for instrumentation. The below regexes work on
# mysql but not sqlite. Probably won't work on postgresql either.
case method
when "select", "delete"
table = $1 if payload[:sql] =~ / FROM `(\w+)`/
@wycats
wycats / gist:1627976
Created January 17, 2012 18:26
How to debug dynamic loading
export DYLD_PRINT_OPTS="1"
export DYLD_PRINT_ENV="1"
export DYLD_PRINT_LIBRARIES="1"
export DYLD_PRINT_LIBRARIES_POST_LAUNCH="1"
export DYLD_PRINT_APIS="1"
export DYLD_PRINT_BINDINGS="1"
export DYLD_PRINT_INITIALIZERS="1"
export DYLD_PRINT_REBASINGS="1"
export DYLD_PRINT_SEGMENTS="1"
export DYLD_PRINT_STATISTICS="1"