Skip to content

Instantly share code, notes, and snippets.

@seanmcgary
seanmcgary / geo.vcl
Created July 24, 2020 13:02 — forked from simonkuhn/geo.vcl
Fastly VCL for geoip json output
sub vcl_recv {
#FASTLY recv
# We don't do other methods
if (req.method != "GET") {
return(error);
}
# Handle IPv4 or IPv6 provided in url path (nothing extraneous allowed, perform basic matching)
if (req.url.path ~ "^/([a-f0-9:.]+)$") {
set client.geo.ip_override = re.group.1;

Keybase proof

I hereby claim:

  • I am seanmcgary on github.
  • I am seanmcgary (https://keybase.io/seanmcgary) on keybase.
  • I have a public key whose fingerprint is 4240 994D AC50 15D0 4534 39BE 7C60 0553 81DE 4E5E

To claim this, I am signing this object:

application.view.AddressView = application.view.BaseView.extend({
init: function(){
// init one
}
});
application.view.SubAddressView = application.view.AddressView.extend({
init: function(){
// init two
application.view.AddressView.prototype.init.apply(this, _.values(arguments));
@seanmcgary
seanmcgary / gist:039009b6b625ac244110
Created January 18, 2015 06:30
Google Analytics Spammer Referral Domains
buttons-for-website.com
darodar.com
toster.ru
semalt.com
ilovevitaly.co
priceg.com
forum.darodar.com
blackhatworth.com
hulfingtonpost.com
thenewstack.io
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x8d19e9
goroutine 1 [running]:
runtime.asmcgocall(0x4062b0, 0x7f791cc31f20)
/usr/local/go/src/pkg/runtime/asm_amd64.s:619 +0x2d fp=0x7f791cc31f10
newm(0x425f50, 0x0)
/usr/local/go/src/pkg/runtime/proc.c:908 +0xa1 fp=0x7f791cc31f48
@seanmcgary
seanmcgary / .gitconfig
Last active August 29, 2015 14:02
.zshrc
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
[color]
status = auto
branch = auto
diff = auto
[core]
whitespace = trailing-space,space-before-tab,indent-with-non-tab
editor = vim
-- Logs begin at Mon 2014-06-09 22:44:47 UTC, end at Tue 2014-06-17 05:51:01 UTC. --
Jun 17 02:01:13 ip-10-171-147-187 systemd[1]: Starting etcd...
Jun 17 02:01:13 ip-10-171-147-187 systemd[1]: Started etcd.
Jun 17 02:01:14 ip-10-171-147-187 etcd[527]: [etcd] Jun 17 02:01:14.248 INFO | cd58765ad63b40fa9eba76d31ba7747b: peer added: 'eb49fda14d6a4e19ae3e161c782a7887'
Jun 17 02:01:14 ip-10-171-147-187 etcd[527]: [etcd] Jun 17 02:01:14.290 INFO | The path /var/lib/etcd/log is in btrfs
Jun 17 02:01:14 ip-10-171-147-187 etcd[527]: [etcd] Jun 17 02:01:14.291 WARNING | Failed setting NOCOW: skip nonempty file
Jun 17 02:01:14 ip-10-171-147-187 etcd[527]: [etcd] Jun 17 02:01:14.293 INFO | etcd server [name cd58765ad63b40fa9eba76d31ba7747b, listen on :4001, advertised url http://10.0.0.1:4001]
Jun 17 02:01:14 ip-10-171-147-187 etcd[527]: [etcd] Jun 17 02:01:14.293 INFO | peer server [name cd58765ad63b40fa9eba76d31ba7747b, listen on :7001, advertised url http://10.0.0.1:7001]
Jun 17 02:01:14 ip-10-1
### Keybase proof
I hereby claim:
* I am seanmcgary on github.
* I am seanmcgary (https://keybase.io/seanmcgary) on keybase.
* I have a public key whose fingerprint is B71F 088F 2BAD 5E42 85C3 3955 C073 6323 72E4 BCDC
To claim this, I am signing this object:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html {
height: 100%;
}
body {
margin: 0;
padding: 0;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OV05TV2hpdGVcTlNDb2xvclNwYWNlViRjbGFzc00w
IDAuODk5OTk5OTgAEAOAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqIS
FFhOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FIUF1k