This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_recv { | |
if (table.lookup(redirects, req.url)) { | |
error 777 "Moved"; | |
} | |
#FASTLY recv | |
if (req.request != "HEAD" && req.request != "GET" && req.request != "FASTLYPURGE") { | |
return(pass); |
- Everyone is safe, respected, and treated with empathy and dignity.
- Pay is competitive, fair, and relatively transparent.
- Capitalize on a culture of looking at other jobs in other companies.
- Titled leaders deeply respect their implicit influence.
- Managers of technical workers are always highly technically skilled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :fastly do | |
desc "set fastly cors headers to fix chrome/firefox font loading issues" | |
task allow_cors: :environment do | |
# check for the Cors Allow header | |
versions = Yajl.load(Excon.get("https://api.fastly.com/service/#{ENV['FASTLY_SERVICE_ID']}/version", | |
:headers => {'Fastly-Key'=>ENV['FASTLY_API_KEY']}).body) | |
last_version = versions.last['number'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -exo pipefail | |
BUILD_ENV=$1 | |
if [ `uname` == 'Darwin' ]; then | |
OSX=1 | |
JSCOMPRESSOR="yuicompressor --type js" | |
else | |
OSX= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby -v | |
jruby 1.7.5.dev (1.9.3p392) 2013-09-04 090d5dd on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64] | |
$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 'require "rails"' | |
jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 5.18s user 0.47s system 136% cpu 4.142 total | |
$ time jruby -e 'require "rails"' | |
jruby -e 'require "rails"' 14.60s user 0.44s system 202% cpu 7.444 total |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### | |
# | |
# THIS IS NOW A REAL GEM (and much improved...): | |
# https://github.com/jm/toml | |
# | |
####################### | |
require 'time' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion | |
# | |
# ## Caveats | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails Unsafe Query Generation (CVE-2013-0155) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/t1WFuuQyavI | |
# | |
# ## Synopsis | |
# |
NewerOlder