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
[email protected]: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'
@simonvc
simonvc / gist:5815946
Last active December 18, 2015 17:08
This is an example of how a Ipython Notepad looks when used as a blog. To view this visit http://nbviewer.ipython.org/url/gist.github.com/simonvc/5815946/raw/8fc4842e523608ca51f37c8274f4016bc7ba58ad/gistfile1.txt
{
"metadata": {
"name": "plotrandomnumbers"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@simonvc
simonvc / gist:6053881
Last active December 20, 2015 02:09 — forked from ikawka/gist:4174481
# see also http://www.pickysysadmin.ca/2013/03/25/how-to-install-gitlab-5-0-on-centos-6/
su -
#dependcies
#centos 6.2 | http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm
rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum -y groupinstall 'Development Tools' 'Additional Development'
@simonvc
simonvc / gist:6105489
Created July 29, 2013 16:13
hackathon twilio code
from flask import Flask, request, redirect
from pony.orm import *
import twilio.twiml
from twilio.rest import TwilioRestClient
import logging
log = logging.getLogger('werkzeug')
db = Database('sqlite', 'responses.sqlite', create_db=True)
class Response(db.Entity):
number = Required(unicode)
terrorist_number = Optional(unicode)
@simonvc
simonvc / amazonformat.py
Created July 30, 2013 13:58
Here's how to process amazon csv format.
#!/usr/bin/env python
from datetime import datetime, date
from csv import reader
from sys import argv
dateformat='%Y/%m/%d %H:%M:%S'
if __name__=='__main__':
filename = argv[1]
@simonvc
simonvc / gist:7007444
Created October 16, 2013 13:08
hobbyking
Thanks for shopping at our store
Your order details are:
1x #9171000184/31544 Turnigy 9XR Transmitter Mode 2 (No Module) = 50.22
1x #9171000070/24656 OrangeRX DSMX/DSM2 2.4Ghz Transmitter Module (JR/Turnigy compatible) = 29.95
1x #9387000027-0/42844 HobbyKing Pocket Quad V1.1 Ultra-Micro DSM2 MultiWii Quadcopter (PNF) = 49.84
1x #9387000020-0/42098 0716 Replacement Brushed Set HobbyKing Pocket Quad V1.1 Quadcopter (4pc) = 5.56
3x #9387000021-0/42099 45mm Replacement Prop Set HobbyKing Pocket Quad V1.1 Quadcopter (8pc) = 5.16
Paypal Express