Skip to content

Instantly share code, notes, and snippets.

View reubano's full-sized avatar

Reuben Cummings reubano

View GitHub Profile
@ksafranski
ksafranski / Common-Currency.json
Last active April 6, 2025 18:27
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@ggaughan
ggaughan / pipeloadYQL.py
Created June 2, 2012 12:54
Initial YQL pipe loader mechanism
"""Pipe finders and loaders
Use these to import Yahoo! pipes as Python modules with support for nested imports
(C) Greg Gaughan, 2012
"""
"""Example usage (see __main__ below for a dynamic version):
import sys
@domenic
domenic / 1flickrApi.js
Last active April 4, 2018 07:35
Flickr API experiments
"use strict";
// Uses jQuery and Q.
var API_KEY = "whatever";
function getFlickrResponseAsync(method, responseProperty, params) {
var deferred = Q.defer();
$.ajax("http://www.flickr.com/services/rest/", {
@linus
linus / Publish a message
Created January 4, 2012 15:54
Server-side Events with Node.js and Redis
linus@Newton:~$ redis-cli
redis 127.0.0.1:6379> publish /updates.foo "hello there!"
(integer) 1
redis 127.0.0.1:6379>
@spulec
spulec / pre-commit
Last active January 13, 2023 02:26
Yipit Pre-commit Hook
#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^[MA]\s+(?P<name>.*)$')
CHECKS = [
@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;
@reubano
reubano / formatstrings.R
Created October 12, 2011 11:48
Choropleths in R
#load data
stateAbbr rownames(stateAbbr)unemp_data
#get county names in correct format
countyNames counties statesstates
#concatenate states and counties
unemp_data$counties
#parse out county titles & specifics
@battlehorse
battlehorse / multi_dashboard.html
Created September 26, 2011 14:28
A Google Charts dashboard setup where multiple datatables are used to power a single 'logical' dashboard.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['controls']});
@bergie
bergie / .gitignore
Created September 19, 2011 15:50
Node.js email handling examples
config.json
reading-image.png
@acdha
acdha / postmkvirtualenv
Created September 2, 2011 13:07
My virtualenvwrapper postmkvirtualenv hook
#!/bin/bash
# This hook is run after a new virtualenv is activated.
set -e
(cat <<'PYDOC'
#!/usr/bin/env python
import pydoc
if __name__ == '__main__':
pydoc.cli()