Skip to content

Instantly share code, notes, and snippets.

View vvuksan's full-sized avatar

Vladimir Vuksan vvuksan

View GitHub Profile
@vvuksan
vvuksan / gmetad.conf
Created August 25, 2015 21:47
gmetad.conf
data_source "LOCALCL" 10 127.0.0.1:57203
RRAs "RRA:AVERAGE:0.5:1:244"
setuid_username "ganglia"
xml_port 8700
interactive_port 8701
server_threads 20
rrd_rootdir "/opt/ganglia/unused-rrds"
write_rrds off
@vvuksan
vvuksan / gist:0e1b59727a7fbcd0733d
Created October 14, 2015 15:44
Monitorama requirements according to @obfuscurity
accommodates 250-500 theater style
budget $5k/day (USD)
breakout space for workshops
exhibitor space
casual / hangout spaces
option to outsource catering
travel accessibility
in-house A/V equipment
in-house A/V staff
internet access
sub vcl_recv {
#FASTLY recv
# If geo_override header is supplied use that instead of built in geoip library. For testing.
if ( req.http.geo_override ) {
set req.http.X-Geo-Country = req.http.geo_override;
} else {
set req.http.X-Geo-Country = geoip.country_code;
}
sub aws4_lambda_sign_request {
# Declare local variables we'll need
declare local var.date_stamp STRING;
declare local var.string_to_sign STRING;
declare local var.canonical_request STRING;
declare local var.credential_scope STRING;
declare local var.request_parameters STRING;
declare local var.canonical_querystring STRING;
declare local var.canonical_headers STRING;
@vvuksan
vvuksan / README.md
Created December 22, 2017 00:53
Dictionary creation

To make it work correctly all these environment variables need to be set

export SERVICE_ID=XXXXX
export API_KEY="XXXX"
export VERSION="XXXXX"

Create a dictionary

@vvuksan
vvuksan / deliver.vcl
Last active September 10, 2018 17:55
EZ Publish VCL snippets
# Stale object handling
if (resp.status >= 500 && resp.status < 600) {
/* restart if the stale object is available */
if (stale.exists) {
restart;
}
}
// On receiving the hash response, copy the hash header to the original
// request and restart.
if (req.restarts == 0