I hereby claim:
- I am banterability on github.
- I am banterability (https://keybase.io/banterability) on keybase.
- I have a public key whose fingerprint is E5D9 0808 D4C9 EAD6 6749 DADD 1E96 B62F D7C6 52F4
To claim this, I am signing this object:
var intcomma = function(value) { | |
// inspired by django.contrib.humanize.intcomma | |
var origValue = String(value); | |
var newValue = origValue.replace(/^(-?\d+)(\d{3})/, '$1,$2'); | |
if (origValue == newValue){ | |
return newValue; | |
} else { | |
return intcomma(newValue); | |
} | |
}; |
import os | |
import shutil | |
import urllib2 | |
import zipfile | |
from lxml import etree # requires lxml & friends | |
# TODO: | |
# - Total vote counts | |
# - County-level results |
# based on http://amix.dk/blog/post/19574 | |
from datetime import datetime, timedelta | |
GRAVITY = 0.5 # HN default: 1.8 | |
WINDOW = 36 # max age in hours | |
now = datetime.now() | |
def hours_from_dt(dt): |
h = location.href | |
docStr = /^http:\/\/(\w*).github.com\/(\w*)(?:\/.*)?/ | |
codeStr = /^https?:\/\/github.com\/(\w*)\/(\w*)(?:\/.*)?/ | |
docTmp = "http://$user.github.com/$proj" | |
codeTmp = "https://github.com/$user/$proj" | |
isDoc = h.match(docStr) | |
isCode = h.match(codeStr) | |
redirect = (loc) -> |
<script src="http://media.scpr.org/assets/scripts/webtrends.v2.js"></script> | |
<script> | |
//<![CDATA[ | |
var _tag=new WebTrends(); | |
_tag.dcsGetId(); | |
//]]> | |
</script> | |
<script> | |
//<![CDATA[ | |
_tag.dcsCustom=function(){ |
var ctaColors = { | |
blue: '#00A1DE', | |
brown: '#62361B', | |
green: '#009B3A', | |
orange: '#F9461C', | |
pink: '#E27EA6', | |
purple: '#522398', | |
red: '#C60C30', | |
yellow: '#F9E300' | |
} |
async = require 'async' | |
fs = require 'fs' | |
{filter, flatten} = require 'underscore' | |
OBJ_C_EPOCH = 978307200 | |
DROPBOX_DIR = #"<path to your dropbox folder >/Dropbox/Apps/Reporter-App/" | |
fs.readdir DROPBOX_DIR, (err, files) -> | |
throw new err if err? | |
dataFiles = filter files, (filename) -> /.json/.test filename |
I hereby claim:
To claim this, I am signing this object:
// Run from twitter.com/<yourusername> | |
// this will (duh) delete all your tweets. don't be dumb. | |
var deleteLoop; | |
deleteLoop = setInterval(function(){ | |
var deleteButton = $('.js-actionDelete button'); | |
if(deleteButton.length < 1){ | |
clearInterval(deleteLoop); | |
alert('No more things to delete'); | |
} else { | |
deleteButton[0].click(); |
function flashSupported(){ | |
if (window.ActiveXObject){ | |
try { | |
new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); | |
return true; | |
} catch (e) { | |
return false; | |
} | |
} else { | |
return Array.from(navigator.plugins).some(function(plugin){ |