Skip to content

Instantly share code, notes, and snippets.

View russellsimpkins-nyt's full-sized avatar

Russell Simpkins russellsimpkins-nyt

View GitHub Profile
varnishtest "Cache busting test"
server s1 {
rxreq
expect req.url == "/foo/svc.json?api-key=abc%20qwer1234&another=value&name=value"
txresp
} -start
varnish v1 -vcl+backend {
import std;
sub vcl_recv {
if (req.url ~ "_=[0-9]+") {
#!/bin/bash
### BEGIN INIT INFO
# Provides: rtorrent
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop rtorrent daemon
### END INIT INFO
@russellsimpkins-nyt
russellsimpkins-nyt / geo_functions.c
Created April 14, 2016 21:41
separate logic into geo_functions.c
#include <stdlib.h>
#include <string.h>
#include <maxminddb.h>
#include "vmod_geo.h"
#ifndef DEBUG
#define DEBUG 0
#endif
static MMDB_s mmdb_handle;
#include <stdlib.h>
#include <maxminddb.h>
#include "vrt.h"
#include "bin/varnishd/cache.h"
#include "include/vct.h"
#include "vcc_if.h"
// lookup a city
const char*