Skip to content

Instantly share code, notes, and snippets.

mccutchen / HOST remote_app
Created Nov 15, 2012
Hacky remote editor setup for bitly VMs
View HOST remote_app
open -a $app $@
bsparrow435 / gist:3486140
Created Aug 27, 2012
Delete keys map reduce
View gist:3486140

#Map Reduce Delete Instructions

Set allow_strfun true on all nodes:

echo "rpc:multicall([node() | nodes()], application,set_env,[riak_kv,allow_strfun,true])." | bin/riak attach

Insert 15000 keys:

for i in {1..15000}; do curl -XPUT$i -H "content-type: text/plain" -d "Data #$i\n"; done
mccutchen / HOST-remote_app
Created Jan 17, 2012
Hacky remote TextMate setup for bitly VMs
View HOST-remote_app
open -a $app $@
soemarko / theme.html
Created Nov 26, 2011
embed github gist to tumblr
View theme.html
<!-- Add the following lines to theme's html code right before </head> -->
<script src=""></script>
<script src=""></script>
<script src=""></script>
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist"></div>
wlach /
Created May 9, 2011
Simple and stupid python script to get the range of dates covered by its service periods (useful for telling if a feed is way out of date, or will be soon)
import os
import sys
from codecs import iterdecode
from zipfile import ZipFile
import csv
import datetime
if len(sys.argv) < 2:
View ssh.rb
#!/usr/bin/env ruby
# Inspired by
# == What this version does:
# 1) Launch an SSH process
# 2) Grab the IP that SSH connected to
# 3) Hash that IP and generate a colour from it
# 4) Change's background colour to that colour.
# 5) Change the colour back when SSH exits.
# Copyright (c) 2010, Philip Plante of
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in