Skip to content

Instantly share code, notes, and snippets.

Vladimir Vuksan vvuksan

Block or report user

Report or block vvuksan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vvuksan
vvuksan / deliver.vcl
Last active Sep 10, 2018
EZ Publish VCL snippets
View deliver.vcl
# 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
@vvuksan
vvuksan / README.md
Created Dec 22, 2017
Dictionary creation
View README.md

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

View gist:99bacbf1fd2140cea2f85ea70d30ab04
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;
View gist:ae616969b987babd0e25
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;
}
@vvuksan
vvuksan / gist:0e1b59727a7fbcd0733d
Created Oct 14, 2015
Monitorama requirements according to @obfuscurity
View gist:0e1b59727a7fbcd0733d
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
View 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:7f60f5552c2b96f39b16
Created Dec 27, 2014
Packet loss to Digital Ocean JFK
View gist:7f60f5552c2b96f39b16
$ mtr -c 20 -r -w -z x.x.x.x
Start: Sat Dec 27 11:19:47 2014
HOST: xxxxxx Loss% Snt Last Avg Best Wrst StDev
<snip>
3. AS11426 gig10-0-0-424.rlghnca-rtr2.nc.rr.com 0.0% 20 19.2 25.6 10.6 73.2 13.1
4. AS11426 cpe-024-025-062-150.ec.res.rr.com 0.0% 20 14.2 14.3 10.8 36.4 5.3
5. AS11426 be31.chrcnctr01r.southeast.rr.com 0.0% 20 16.7 20.6 16.7 23.5 1.8
6. AS7843 bu-ether34.atlngamq46w-bcr00.tbone.rr.com 0.0% 20 28.5 24.7 20.6 33.9 3.6
7. AS7843 bu-ether21.atlngamq47w-bcr01.tbone.rr.com 0.0% 20 27.6 25.7 22.2 32.8 3.0
8. AS7843 107.14.17.190 0.0% 20 25.0 24.0 20.1 61.9 9.0
View install_phantomjs.rb
#!/usr/bin/env ruby
# coding: UTF-8
# install_phantomjs.rb
#
# download, build, and install PhantomJS for Raspberry Pi
#
# * tested: PhantomJS 1.9.7 / Raspbian (Wheezy)
#
# created on : 2014.02.13
@vvuksan
vvuksan / gist:6002154
Created Jul 15, 2013
Code Anywhere random errors
View gist:6002154
$ curl -v http://www.codeanywhere.net
* About to connect() to www.codeanywhere.net port 80 (#0)
* Trying 168.61.33.86...
* Connected to www.codeanywhere.net (168.61.33.86) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.codeanywhere.net
> Accept: */*
>
< HTTP/1.1 200 OK
@vvuksan
vvuksan / gist:4425024
Last active Dec 10, 2015
time.apple.com NYE 2013 issues
View gist:4425024
# date
Tue Jan 1 02:46:29 UTC 2013
# ntpdate -q time.apple.com
server 17.171.4.13, stratum 16, offset -0.994684, delay 0.03630
server 17.151.16.22, stratum 16, offset -0.994590, delay 0.10086
server 17.151.16.21, stratum 16, offset -0.995015, delay 0.10132
server 17.151.16.20, stratum 15, offset -0.995329, delay 0.10136
server 17.151.16.23, stratum 15, offset -0.995040, delay 0.10164
server 17.171.4.33, stratum 15, offset -0.994484, delay 0.03622
server 17.171.4.34, stratum 16, offset -0.994793, delay 0.03615
You can’t perform that action at this time.