Skip to content

Instantly share code, notes, and snippets.

@glasserc
glasserc / funding.org
Last active December 20, 2015 08:19
Tracking the Ubuntu Edge campaign

All times are in NYC time.

TimeAmountNew hrsNew $Est $/hrHrs leftEst total
<2013-07-25 Thu 13:00>5936196nannannan658.99999nan
<2013-07-25 Thu 16:10>60695933.16665613339742125.510655.8333433696907.
<2013-07-25 Thu 17:16>61126291.0999924303639123.921654.7333431728364.
<2013-07-25 Thu 19:52>61910352.6000167840630155.968652.1333325856747.
<2013-07-25 Thu 20:43>62092450.8499841821021423.933651.2833420162296.
<2013-07-25 Thu 23:03>62452072.3333523596215412.162648.9499916246929.
@glasserc
glasserc / annex-breakage.py
Created September 14, 2012 02:15
Quick hack to fix my git-annex repo
#! /usr/bin/python
# Quick hack to find and rearrange files from a broken git-annex.
#
# One of my drives with a git annex suffered major filesystem
# corruption, and pretty much all the files got dumped into
# lost+found. Fortunately git-annex symlinks contain all the
# information you need to find your files and see if they're still OK
# -- to wit, the filesize and a SHA.
import os
@glasserc
glasserc / redate-photos.py
Created September 14, 2011 09:52
Program to adjust dates on EXIF tags for a bunch of JPEG files using python-exif and exiftool
#! /usr/bin/python
"""Program to fix my screwed up camera date/time settings.
At some point, some children adjusted the date on my camera as well as
the locale settings. Photos were henceforth marked as being one day
earlier than they should have been (i.e. the 28th instead of the 29th).
Later, I noticed that the camera date was wrong, but because the
equivalent of LC_DATE was different, I thought it was one MONTH early
instead of one DAY. I "fixed" it by putting the date on the camera
@glasserc
glasserc / monitor.vala
Created September 14, 2011 09:40
why Vala is not my favorite programming language
// monitor.vala: why Vala is not my favorite programming language.
//
// A program to walk the filesystem tree and install FileMonitors on
// every directory found, in order to test a limit on notifications.
// This will do a TON of I/O. On my machine it takes almost an hour
// to chew through my hard drive. The good news is that it doesn't
// hit a limit.
//
// FileMonitor is implemented I think using inotify, so if you're
// running Linux, the easier way to discover these limits is: