Skip to content

Instantly share code, notes, and snippets.

View simonvc's full-sized avatar
💭
Hiring Go Engineers

Simon Vans-Colina simonvc

💭
Hiring Go Engineers
View GitHub Profile
@simonvc
simonvc / docker.md
Last active August 29, 2015 13:58
Docker networking proposal

Seriously, the current state of connecting docker hosts together is poor. Most solutions seem to rely on stuffing ENVIRONMENT variables into docker hosts. I think we can do better..

I want to create a config file that looks like this:

# Host is a reserved name, MyWebContainer will look for a docker container called MyWebContainer
HOST:(*)80 --> MyWebContainer:8080
 
# any tcp connections on (*) any source port, with the dst port as 3306 will be routed to the mydatabase continer port 3306
MyWebContainer(*)3306 --> MyDataBase:3306
@simonvc
simonvc / keybase.md
Created September 17, 2014 14:56
keybase

Keybase proof

I hereby claim:

  • I am simonvc on github.
  • I am simonvc (https://keybase.io/simonvc) on keybase.
  • I have a public key whose fingerprint is F251 3223 EBB4 6E00 F160 84A4 AEA8 9F35 D783 11AD

To claim this, I am signing this object:

@simonvc
simonvc / fix.sh
Created May 27, 2015 13:41
Script to fix files with the query string attached.
ls *\?* | while read fn; do nfn=$(echo $fn | tr '\?' ' ' | awk '{print $1}'); cp "$fn" $nfn;done
@simonvc
simonvc / gist:67c0c406d6ff4c146854
Last active August 29, 2015 14:26
thug180 cleanflight settings
# version
# Cleanflight/NAZE 1.10.0 Jul 31 2015 / 15:12:38 (96061b8)
# dump master
# mixer
mixer QUADX
mmix reset
smix reset
@simonvc
simonvc / gist:bbeb6e9c8a47d040ac6b
Created August 30, 2015 20:07
blackout cleanflight 1.9.0
# dump
# version
# Cleanflight/SPRACINGF3 1.9.0 May 31 2015 / 13:17:30 (98f7549)
# dump master
# mixer
mixer QUADX
git@github.com:simonvc/riak-dev-cluster.git
rake bootstrap
@simonvc
simonvc / gist:4761844
Created February 12, 2013 11:58
How to load 10k keys into riak
for x in {1..10000};do curl -v -X PUT -H 'Content-type: text/text' -d "This is some data $x" http://127.0.0.1:11098/riak/test/$x; done
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bootp_enabled</key>
<false/>
<key>detect_other_dhcp_server</key>
<integer>1</integer>
<key>dhcp_enabled</key>
<array>
<string>en3</string>
@simonvc
simonvc / hostedgraphite
Created April 11, 2013 14:07
quick little recipe to push riak stats to hostedgraphite.com
import json
from urllib2 import urlopen
import socket
UDP_ADDRESS = "carbon.hostedgraphite.com"
UDP_PORT = 2003
RIAK_STATS_URL='http://localhost:11098/stats'
HG_API_KEY='YOUR_API_KEY'
@simonvc
simonvc / stats-to-hosted-graphite.py
Last active December 16, 2015 03:39
This little recipe will pump your riak stats into hosted graphite. For more information see hostedgraphite.com @simonvc
import json
from urllib2 import urlopen
import socket
from time import sleep
UDP_ADDRESS = "carbon.hostedgraphite.com"
UDP_PORT = 2003
RIAK_STATS_URL='http://localhost:11098/stats'
HG_API_KEY='Your Api Key from HostedGraphite.com'