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 / 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;
@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 / 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 / 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 / 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
}
// ==UserScript==
// @match http://*.fab.com/*
// ==/UserScript==
$(document).ready(function() {
$(".newLoginProcess").hide();
$(".modal-bg").hide();
});
@benburton
benburton / fab.user.js
Created June 7, 2012 16:51
Fab.com - Remove signup blocker
// ==UserScript==
// @name Fab.com - Remove signup blocker
// @match http://fab.com/*
// @match http://www.fab.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
script.addEventListener('load', function() {
@benburton
benburton / mailFilters.xml
Created January 10, 2013 14:17
GMail filter to mark annoying HipChat @ALL emails as read automatically.
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1357827393586</id>
<updated>2013-01-10T14:16:38Z</updated>
<author>
<name>Ben Burton</name>
<email>ben@neo.com</email>
</author>
<entry>
<category term='filter'></category>
@benburton
benburton / why.sh
Created April 18, 2013 21:44
Poll whytheluckystiff.net for new pages, download them, and provide notifier alerts.
#!/bin/sh
RECENT=`curl -s http://whytheluckystiff.net | awk '/./{line=$0} END{print line}' | awk '{print $1}'`
while [ true ]
do
LATEST=`curl -s http://whytheluckystiff.net | awk '/./{line=$0} END{print line}' | awk '{print $1}'`
if [ "$RECENT" != "$LATEST" ]
then
wget http://whytheluckystiff.net/${LATEST}
terminal-notifier -message $LATEST -title '_why'
RECENT=$LATEST
@benburton
benburton / gist:2b799c3b6afd4daea3de
Created November 16, 2014 02:09
PGP Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFRoBcwBCADQ785S44m2i5O1SL9bsW/DK31UbsSzlUHZ2v7vyHPYFuasAD5M
IHwkqaA+eG3miv2gjpeMxv5KhI47Zz11niO9RyR+fyjEzNQ/7iqW21oDgHlaGMCy
A4NWVHj7B9/hlCJE2hhfKc0ARZKz7pC5bBDa4mTKYuEGoftqjgyQPO+1YozLNj4J
rpu8TcXPNcJICbCeZGdgNXDM1ULvSnuxYLIsNxGH2ZBdkzJ0L8ErHp+30kd6o0gu
pdnLO9QJCKV7M2apsd4jOLhvapoAuONhMOnUupeBErJyvsoilaXJE3XONYEbu6Cn
t3FYXUb7WqQ8Dqv56p/zbF5J+qPi0Bh2RdYRABEBAAG0MkJlbmphbWluIEJ1cnRv
biA8YmVuamFtaW4uam9zZXBoLmJ1cnRvbkBnbWFpbC5jb20+iQE4BBMBAgAiBQJU