(via kottke)

Bailout, Barry and Levon Style

While not as useful as Jeb’s beloved hipster replacement greasemonkey script, this one is a bit more timely. I’m as worried as the next guy about the current financial crisis, but sometimes I just want to put my blinders on when I read the news.

Thus, I present a spoonful of scripting to help that morning New York Times go down a bit easier:

// Based on a script in Mark Pilgram's upcoming "Dive into Greasemonkey",
// based off another script based off that

// ==UserScript== 
// @name          ignorebailout
// @namespace     http://modcult.org/userscripts
// @description   Hide from reality.
// @include       *
// ==/UserScript== 


(function() {
    var replacements, regex, key, textnodes, node, s; 

    replacements = { 
        "bailout": "balls out",
        "Bailout": "Balls out",
        "(\\$[0-9]+ +billion)": "$1 worth of pudding"
    }; 

    regex = {}; 
    for (key in replacements) { 
        regex[key] = new RegExp(key, 'g'); 
    } 

    textnodes = document.evaluate( "//body//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); 

    for (var i = 0; i < textnodes.snapshotLength; i++) { 
        node = textnodes.snapshotItem(i); 
        s = node.data; 
        for (key in replacements) { 
            s = s.replace(regex[key], replacements[key]); 
        } 
        node.data = s; 
    } 

})();

shouldn’t that be $240 worth of pudding?


that’s a matched pattern, so it will be however much pudding congress wants to give.


%s1 / %s2

Life stinks.

I’m seeing pink.

I can’t wink.

I can’t blink.

I like the Kinks.

I need a drink.

I can’t think.

I like the Kinks.

Life stinks.

When Larry Levine helped prepare divorce papers for a client a few years ago, he got paid in mackerel. Once the case ended, he says, “I had a stack of macks.” Mr. Levine and his client were prisoners in California’s Lompoc Federal Correctional Complex. Like other federal inmates around the country, they found a can of mackerel – the “mack” in prison lingo – was the standard currency.
(via wsj)

my favorite graf:

There are other threats to the mackerel economy, says Mr. Linder, of Power Commissary. “There are shortages world-wide, in terms of the catch,” he says. Combined with the weak dollar, that’s led to a surging mack. Now, he says, a pouch of mackerel sells for more than $1 in most commissaries.