Skip to content

Instantly share code, notes, and snippets.

Content-Type: text/html;charset=UTF-8
X-Varnish: 29 98320
Age: 0
Via: 1.1 varnish-v4
X-Grace: none
Accept-Ranges: bytes
Content-Length: 105044
Date: Fri, 01 Aug 2014 08:14:00 GMT
X-Varnish: 1710695096
Age: 0
kv {
field_split => ":"
tags => ["deploy"]
add_tag => "deploy-kv"
}
#eth0 is manually configured, and slave to the "bond0" bonded NIC
auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0
#eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
bond-master bond0
if (beresp.ttl <= 0s ||
beresp.http.Set-Cookie ||
beresp.http.Surrogate-control ~ "no-store" ||
(!beresp.http.Surrogate-Control &&
beresp.http.Cache-Control ~ "no-store|private") ||
beresp.http.Vary == "*") {
/*
* Mark as "Hit-For-Pass" for the next 2 minutes
*/
set beresp.ttl = 120s;
# fpm --gem-gem /usr/bin/gem1.9.1 -s gem -t deb --verbose multi_json
Trying to download {"level":"info","gem":"multi_json","version":null}
Fetching: multi_json-1.3.6.gem (100%)
Using gem file {"level":"info","path":"/var/lib/gems/1.8/cache/multi_json-1.3.6.gem"}
Successfully installed multi_json-1.3.6
1 gem installed
Setting from flags: epoch= {"level":"info"}
Setting from flags: iteration= {"level":"info"}
Converting gem to deb {"level":"info"}
Package name includes underscores, converting to dashes {"level":"info","name":"rubygem-multi_json"}
if( req.url ~ "^/login" || req.url ~ "^/widget" ){
return (pass);
}
else {
unset req.http.Cookie;
return(lookup);
}
if (beresp.status >= 500) {
set beresp.saintmode = 60s;
std.log("XX: i haz 5xx! " + beresp.status + req.url);
return(restart);
}
@roflmao
roflmao / logstash.conf
Created January 30, 2013 10:24
grep filter logstash y u no wrk
input {
stdin { type => "stdin-type"}
# syslog {
# type => syslog
# port => 5544
# }
tcp {
port => 10514
type => "syslog"
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@roflmao
roflmao / gist:5150510
Created March 13, 2013 09:24
Trying to build awesant from last master with debuild.
root@wheezybuild64:~/hest/awesant# debuild -us -uc
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of awesant_0.7.orig.tar.gz, awesant_0.7.orig.tar.bz2,
awesant_0.7.orig.tar.lzma, awesant_0.7.orig.tar.xz or awesant.orig)
continue anyway? (y/n) y
dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package awesant
dpkg-buildpackage: source version 0.7-1