March 18, 2010

GWT Development Mode Bookmarklet

Sometimes, when debugging a GWT application, one needs to attach the magical gwt.codesvr= incantation to a URL manually, for whatever reason. It’s easy enough to do this by hand but even easier to use a bookmarklet. Create a bookmark from that there link and, when you click it later, it will add the GWT development mode parameters to the currently open URL. If you need to use a development mode server other than localhost you’ll need to edit the bookmarklet accordingly – it may be easier to do so using the un-collapsed script:

javascript:(
  function() {
    h = "localhost";
    p = "9997";
    l = "gwt.codesvr=" + h + ":" + p;

    if (document.location.href.indexOf("gwt.codesvr") < 0) {
      q = document.location.href.indexOf("?");

      if (q < 0) {
        document.location.href = document.location.href + "?" + l;
      } else {
        b = document.location.href.substr(0, q + 1);
        e = document.location.href.substr(q + 1);
        document.location.href = b + l + "&" + e;
      }
    }
  }
)();

January 7, 2010

Two Gentlemen of Lebowski

Adam Bertocci rewrote The Big Lebowski as he imagines it would look if written by Shakespeare. Two Gentlemen of Lebowski:

CHORUS
In wayfarer’s worlds out west was once a man,
A man I come not to bury, but to praise.
His name was Geoffrey Lebowski called, yet
Not called, excepting by his kin.
That which we call a knave by any other name
Might bowl just as sweet. Lebowski, then,
Did call himself ‘the Knave’, a name that I,
Your humble chorus, would not self-apply
In homelands mine; but, then, this Knave was one
From whom sense was a burden to extract,
And of the arid vale in which he dwelt,
Also dislike in sensibility;
Mayhap the very search for sense reveals
The reason that it striketh me as most
Int’resting, yea, inspiring me to odes.
(In couplets first, and then a sonnet brave
As prologue to the tale of this the Knave.
Behold him, then, a-tumbling softly down
To pledge his love immortal to the ground.)
We stray now from fair Albion and from France
And see no Queen of bawdy songs and cheers
And in an angel’s city take our chance
For stupefying tales to take our ears.
To war on Arab kings acoast we go,
Needing a man of times, though hero not;
Hear me call him not hero; what’s in a hero?
Sometimes there’s a man, your prologue’s thought.
The Knave, though scarcely man of honour’d grace,
Nor hero Olympian, nor yet employ’d,
Was nonetheless for all his time and place,
The man befits the circle he’s enjoy’d.
A man of lazy ways, of epic sloth;
But, losing train of thought, I’ve spake enough!

It only gets better.