Skip to content

Instantly share code, notes, and snippets.

View ehg's full-sized avatar

Chris Blower ehg

  • Automattic
  • Liverpool, UK
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ehg on github.
  • I am ehgy (https://keybase.io/ehgy) on keybase.
  • I have a public key ASARYUrGfanuGEJ_QEN4ssxjEZ-19NLEyF0m6l68ejhWLQo

To claim this, I am signing this object:

[color]
diff = auto
status = auto
branch = auto
[status]
relativePaths = false
[core]
excludesfile = ~/.gitignore
[alias]
ci = commit
@ehg
ehg / gist:5633585
Last active December 17, 2015 15:39
#!/bin/sh
# Get mirroring working on ScraperWiki iiyama monitor.
if [ "$(whoami)" != "chris" ]; then
echo "Don't use this if you're not me!"
exit 1
fi
xrandr --newmode "1600x900_60.10" 119.20 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
xrandr --addmode VGA1 1600x900_60.10
@ehg
ehg / wrapper_spike.py
Created April 10, 2012 09:27
dumptruck/scraperlibs wrapper spike
import scraperwiki
from dumptruck import DumpTruck
dt = DumpTruck()
def execute(sqlquery, data=None, verbose=1):
""" Should return list of lists, but returns list of dicts """
return dt.execute(sqlquery, *data, commit=False)
# other way [ dict(zip(result["keys"], d)) for d in result["data"] ]