Skip to content

Instantly share code, notes, and snippets.

View benburton's full-sized avatar
👨‍💻
Content-Type: application/person

Ben Burton benburton

👨‍💻
Content-Type: application/person
View GitHub Profile
@benburton
benburton / fitter.sh
Created March 31, 2012 21:12
Radiohead's "Fitter Happier" (bash on OS X)
#!/bin/sh
function fh {
IFS=$'\n'
for i in $1
do say -v fred $i; sleep .25
done
unset IFS
}
@benburton
benburton / antparse.py
Created February 24, 2012 00:07
Script that lets you know if you drink for free at Antarctica this month!
#!/usr/bin/env python
import sys
import urllib2
from lxml import etree
from pyquery import PyQuery as pq
if len(sys.argv) != 2:
print "Usage: ./antparse.py name"
else:
@benburton
benburton / lot18-pricing.user.js
Created December 24, 2011 15:14
Add price/bottle to lot18
// ==UserScript==
// @name Add price/bottle to lot18
// @namespace lot18
// @include http*://*.lot18.com/*
// @require http://www.lot18.com/js/jquery.js
// ==/UserScript==
(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}
@benburton
benburton / lot18-pricing.user.js
Created December 24, 2011 15:12
Add price/bottle to lot18
// ==UserScript==
// @name Add price/bottle to lot18
// @namespace lot18
// @include http*://*.lot18.com/*
// ==/UserScript==
(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b
@benburton
benburton / Fluid.Trello.js
Created October 3, 2011 16:49
Trello Userscript for Fluid
(function() {
$(document).ready(function(){
window.fluid.dockBadge = '';
var previousText;
var newPostCount = 0;
setInterval(function() {
var latestText = $('.list-actions .phenom-desc:first').text();
if (!previousText) {
previousText = latestText;