Skip to content

Instantly share code, notes, and snippets.

# this tests a critical regex used in the 'Whitelist Query Params' config in
# Fastly, to transform request URLs into a normalized version that strips
# 'traffic partner' tracking params and other noise, but leaves any valid keys
# that match the params we actually use. A lot hinges on the proper operation
# of this regex to keep hit ratio high but leave needed params intact.
#
# This version leaves trailing ? and &, which is unavoidable now but are pulled
# out by a simple second sweep.
#
# http://regex101.com/r/oJ2gI6/10
@sbeam
sbeam / deploy.rb
Created August 23, 2012 18:55
Ruby version management on Debian
require "bundler/capistrano" # runs bundle:install on remote for us
# give cap the correct path to our custom installed rubies
default_environment['PATH'] = "/usr/local/ruby/bin:/usr/bin:/bin"
# ... rest of normal cap config