view at http://bl.ocks.org/2970392
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import * | |
class Haiku(Model): | |
id = Column(Integer, primary_key=True) | |
ctime = Column(DateTime, default=func.now()) | |
line1 = Column(Text()) | |
line2 = Column(Text()) | |
line3 = Column(Text()) | |
query = (Session.query(Haiku) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#/ jc -- jconsole via ssh proxy | |
#/ | |
#/ Usage: jc [options] HOST JMX_PORT [PROXY_PORT=JMX_PORT] [JMX_HOST=HOST] | |
#/ | |
#/ Starts a SOCKS proxy via ssh to connect to a | |
#/ JVM running on a remote and protected machine. | |
#/ | |
#/ Arguments: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for repo in $(cat repos.txt); do | |
repodir=$(perl -pe 's!/!-!g;' -e 's/^analytics-//' <<< "$repo") | |
echo git clone --mirror ssh://gerrit.wikimedia.org/$repo.git $repodir | |
if git clone --mirror ssh://gerrit.wikimedia.org/$repo.git $repodir; then | |
echo | |
else | |
break | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Technically, this is Coco, not CoffeeScript, but close enough. | |
{ toString:objToString } = Object:: | |
isArray = Array.isArray or (o) -> objToString.call(o) is '[object Array]' | |
slice = [].slice | |
class exports.EventEmitter | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# TextMate command to correct block indentation for languages with | |
# semantic whitespace (like Python or CoffeeScript). | |
# | |
# Command settings: | |
# input: Selected Text or Document | |
# output: Replace Selected Text | |
# activation: cmd+shift+R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg { | |
font: 10px sans-serif; | |
} | |
.axis path, .axis line { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" Prints image dimensions. | |
""" | |
__author__ = 'David Schoonover <[email protected]>' | |
import sys, re, argparse | |
from subprocess import Popen, PIPE, STDOUT, check_output | |
from path import path | |
from bunch import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arg Name or Optional Flags: | |
positional : str = "foo" | |
options : str = "-f", "--foo" | |
Standard: | |
action : str = [store], append, store_true, store_false, store_const, append_const, version | |
default : * = [None] | |
type : callable = [str], argparse.FileType(mode='wb', bufsize=0) | |
Exotic: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Listens for UDP packets, sending the stream to stdout and | |
// also teeing it to another port on the local machine. | |
// | |
// Usage: teegram.js LISTEN_PORT TEE_PORT | |
var dgram = require('dgram'); |