This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Actions.CopyWindow | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.EwmhDesktops | |
--import XMonad.Hooks.ICCCMFocus | |
import XMonad.Hooks.SetWMName | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.Spiral | |
import XMonad.Util.Run(spawnPipe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/alias logsb lastlog -file ~/irclogs/${tag}/${C}.${F}_${Z}.scrollback.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rotl(num, bits): | |
bit = num & (1 << (bits-1)) | |
num <<= 1 | |
if(bit): | |
num |= 1 | |
num &= (2**bits-1) | |
return num | |
def rotr(num, bits): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This event appears to ping xkcd's servers when various things happen | |
//Probably for serverside logging/analytics/debugging/statistics | |
function ping_event(evt_name) { | |
(new Image).src = "http://xkcd.com/events/" + evt_name | |
} | |
//This function ouputs debug info into the javascript console if the URL has a "#verbose" anchor appended | |
function log() { | |
location.hash == "#verbose" && console.log.apply(console, arguments) | |
} | |
//A list of event streams to choose from at random, for load balancing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunzip -c googlebooks-eng-all-1gram-*-[a-z].gz | pv | grep -P `cat reddit_words.csv | perl -e "while(<>) { s/\'s//g; chomp; push @words, split ','; } printf '^(%s)\\t', join '|', @words;"` > collision_stats.tsv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bigPipe.onPageletArrive({ | |
"is_last": true, | |
"content": { | |
"pagelet_sidebar": { | |
"container_id": "u5da1gw108" | |
} | |
}, | |
"jsmods": { | |
"instances": [ | |
["m229365_110", ["ScrollableArea", "m229365_109"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors','on'); | |
error_reporting(E_ALL); | |
//This is less than desirable, but we'll figure out restructuring later | |
$backend_path = '../../../backend/'; | |
require_once($backend_path . 'lib/logger.php'); | |
require_once($backend_path . 'config.php'); | |
$logger = new Logger(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript");fileref.setAttribute("src", 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js'); document.getElementsByTagName("head")[0].appendChild(fileref); | |
$('div[href^="/files"]').each(function(idx, el) { href = $(el).attr('href'); $(el).replaceWith('<a href="' + href + '">Download</a>') }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postpone(); | |
function postpone() | |
{ | |
init(); | |
window.setTimeout(postpone,500); | |
} | |
function init() | |
{ |