Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ksheurs on github.
  • I am ksheurs (https://keybase.io/ksheurs) on keybase.
  • I have a public key ASDJ2RcA8DVzUxx0gBKr6bsNCkqPHybu3dIBtZ_w7_RnPQo

To claim this, I am signing this object:

@ksheurs
ksheurs / gist:8458939
Created January 16, 2014 17:07
vcl_fetch
sub vcl_fetch {
if ((beresp.status == 500 || beresp.status == 503) && req.restarts < 1 && (req.request == "GET" || req.request == "HEAD")) {
restart;
}
if (req.restarts > 0) {
set beresp.http.Fastly-Restarts = req.restarts;
}
if (beresp.http.Set-Cookie) {
{
"auto_complete": false,
"bold_folder_labels": true,
"color_scheme": "/Users/kevin/Library/Application Support/Sublime Text 2/Packages/User/Blackboard-custom.tmTheme",
"create_window_at_startup": false,
"detect_indentation": true,
"detect_slow_plugins": false,
"draw_indent_guides": true,
"folder_exclude_patterns":
[
@ksheurs
ksheurs / gist:6200646
Created August 10, 2013 14:31
redis-to-go errors
…by/2.0.0/gems/redis-3.0.3/lib/redis/connection/ruby.rb: 238:in `write'
…by/2.0.0/gems/redis-3.0.3/lib/redis/connection/ruby.rb: 238:in `write'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 221:in `block in write'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 206:in `io'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 220:in `write'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 184:in `block (3 levels) in process'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 178:in `each'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 178:in `block (2 levels) in process'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 295:in `ensure_connected'
…bundle/ruby/2.0.0/gems/redis-3.0.3/lib/redis/client.rb: 177:in `block in process'
@ksheurs
ksheurs / pg_terminate_backend.sql
Created November 16, 2012 16:04
Terminate postgres connections...
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'db_name';