This file contains 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
#!/usr/bin/perl | |
my ($q, $n) = ("'", chr(10)); | |
my $s = '#!/usr/bin/perl%smy ($q, $n) = ("%s", chr(10));%smy $s = %s%s%s;%sprintf $s, $n, $q, $n, $q, $s, $q, $n, $n;%s'; | |
printf $s, $n, $q, $n, $q, $s, $q, $n, $n; |
This file contains 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 | |
ZERGLING = 'Zergling', | |
ROACH = 'Roach', | |
HYDRALISK = 'Hydralisk', | |
BANELING = 'Baneling', | |
MARINE = 'Marine', | |
HELLION = 'Hellion', | |
MARAUDER = 'Marauder', | |
REAPER = 'Reaper', | |
TANK = 'Siege Tank', |
This file contains 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
#!/usr/bin/perl | |
use strict; | |
use List::Util 'max'; | |
my ($from, $to) = @ARGV | |
or die "usage: $0 OLD-URL[\@OLDREV] NEW-URL[\@NEWREV]\n"; | |
my @diff = `svn diff $from $to` or die; | |
my @blame = map {/^\s*(\d+)/} `svn blame $to` or die; |
This file contains 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
{"html": "line<br>break"} |
This file contains 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
// produce: accepts a cb which is called with an array of items | |
// initial: initial array of results to return | |
// returns a function which accepts a cb which is called with one item | |
// each time it is called | |
function generator(produce, initial) { | |
var items; | |
var waiting = []; | |
var next = function (cb) { | |
if (items && items.length) { |
This file contains 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
#!/usr/bin/env perl | |
# | |
# Written by John Gruber, taken with permission from: | |
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder | |
use strict; | |
use warnings; | |
use URI::Escape qw(uri_escape_utf8); | |
use open IO => ":utf8", # UTF8 by default | |
":std"; # Apply to STDIN/STDOUT/STDERR |
This file contains 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
#!/usr/bin/env node | |
var sys = require('sys'); | |
function go (fn) { | |
setTimeout(fn, 0); | |
}; | |
var chan = function () { | |
this.readers = []; // [cb, ...] |
This file contains 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
#mw-page-base, #mw-head-base, #content, | |
#mw-head, #mw-panel, #footer { | |
display: block !important; | |
} | |
#mw-sopaOverlay { | |
display: none !important; | |
} |
This file contains 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 thor | |
thor.ssh() |
This file contains 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
<body style="background: black"> | |
<a href="http://inamidst.com/stuff/notes/csspx"> | |
<img src="http://upload.wikimedia.org/wikipedia/en/thumb/c/c9/Moon_nearside_LRO.jpg/170px-Moon_nearside_LRO.jpg" style="width:24.3px;height:24.3px"> | |
</a> |