Grasping at Air

Closure is an elusive quarry, maddeningly taunting you just far enough out of reach. Fuck, some days are hard.

Reload CSS Bookmarklet

Nick asked me today if there was a way to just reload the stylesheets without having to reload the whole page, which can be frustrating for AJAX development. I hacked at it for a bit and stuck it on our development environment, then cleaned it up into a bookmarklet. Drag the following link to your toolbar for CSS reloading happiness & superior quality.

Reload CSS

Update: Fixed it to work in Internet Explorer.* Turns out the original code was doing too much work, adding/removing link elements. The new code simply replaces the href attribute with a randomized value.

javascript:(function() {
    var e = document.getElementsByTagName( "link" );
    for( var i = 0; i < e.length; i++ )
        if( e[ i ].rel.match( /stylesheet/ ) )
            e[ i ].setAttribute( "href", e[ i ].getAttribute( "href" ).replace( /\?_r\=[^&]+|$/, "?_r=" + Math.random() ) );
})();

* Once. It crashes on the 2nd time, at least in IE6 SP2.

Rainy Day Photos

pedalRode around San Francisco on a rainy Saturday.

47x19

When talking with other cyclists, particularly other fixie riders the subject of gearing often comes up. My usual ride has an odd but very specific gearing: 47 up front, 19 in the rear. Why?

The gain ratio (47 / 19) is just a hair under two and a half (2.47). Good for going up (and down) hills in San Francisco. 47 and 19 are both prime. This distributes the wear pretty evenly over the chain and sprockets. Any given link on the chain will hit the same tooth on the chainring every 893 revolutions, which is approximately once per mile with 700c (~27 inch) wheels.

Empirical evidence leads me to believe this ratio is as close to perfect as you can get for San Francisco, for a brakeless everyday fixie. It’s equally good for banging around town or a paradise (Tib) loop.

Fitting the Template

So iTunes users drive VWs and drink cider + imported beer.

Triple Half-Caf Venti IED, Please

WTF?

Organic Fast Food

For a bunch of reasons, I refrain from eating at McDonalds, Burger King, KFC, etc. I’m not vegetarian, but the food I buy/cook tends to skew that way, and I generally buy organic produce, eggs, chicken, and whatever else I can.

Sometimes I absolutely just crave the plasticine mediocrity of a Mickey D’s burger. There’s something about how they’ve perfected the taste and mouth-feel of it that sometimes just sounds really, really good. I haven’t caved into this particular urge in years (score one for standards), but it’s getting harder.

What I want is an organic McDonalds. Not vegetarian, not even necessarily the most wholesome of corporate culture either (it wouldn’t hurt), and not even having particularly good food. I want to be able to roll into OMcDs, order a couple bacon cheeseburgers, shake (is it too much to wish for soy?) and fries, sit down and stuff myself until that greasy-near-nausea feeling overcomes me. Well, maybe not the last part. Truth is, one of the reasons I don’t partake of the McBurgers is just that. The grease overload giveth and the grease overload taketh away. Usually just the memory of my last fast-food binge is enough to keep me on the wagon for a few months.

So refined: a McDonald’s clone, with organic beef/buns/produce, soy milkshakes and comparable fries, somewhere in the San Francisco area. I will gladly pay twice as much.

About This Design

The design of this blog started out as a generic two-column-right template, modified using Custom CSS. I wanted to have a fluid design without fluid column widths. What I did was fix the primary content column (alpha) to a specific width, and then canned the secondary column as a hard & fast container.

The content modules in the right side are fixed width and float left. They are sized such that 3 of them across is equal to the alpha column. On short pages like the Archives page, the sidebar modules wrap nicely around the main content area.

It will probably take some tweaking over the next few weeks until everything is hammered down.

Update 1: Shaved 5-10px off the column widths so that 2 columns fits on an 800x600 screen, 1 column on 640x480, and 3 columns at 1024 pixels wide.

Update 2: Converted the design to Advanced Templates because of a bug in IE6, where the containing div around a set of floats, even position: static and float: none would still wrap the floated elements.

Canvas Implementations

Both Mozilla and the Webkit folks fixed the bugs I noticed with their <canvas> implementations. It was pretty nice to see someone make a Doom-style renderer using the same method I had been attempting at the time.

Caution PCBs

caution pcbsFrom a set of photos taken of the ruined munitions plant in Hunter’s Point.