Skip to content

Instantly share code, notes, and snippets.

View okofish's full-sized avatar

Jesse Friedman okofish

View GitHub Profile
@wetzler
wetzler / gist:6629918
Last active February 23, 2019 21:31
a key with magical powers
d90e5b5598497773de1c57407dd54d65934ba1b5911f6f47311d3c729f510bb5c295284780017a56f17e49234f19c009bfa57f7941413a5dd3c282d7db3692a192b58ea926b637cdcd11377e1e74086641e0672c8b3406aeed49d63ee0a3a3d3751ae7744f08b999df38ca2ccdbb9a2c
@cincodenada
cincodenada / xkcd_time.js
Last active December 15, 2015 10:29
The main part of Javascript that drives xkcd's "Time" comic (http://xkcd.com/1190/), deobfuscated and annotated. The bulk of the script seems to be an implementation of EventSource - which, while important, is not terribly interesting for our purposes, so I've omitted it here. After some Googling around, I am in fact fairly certain that the Even…
//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