Monthly Archive for February, 2007

Snag movie audio tracks

Okay, watching movies in the workplace is a definite no-no, but they didn’t say anything about listening to movies. But I’d rather do it offline, so I whipped up a little bookmarklet that will snag the .MP3 URL off the movies I chose.

  1. First off, select a movie from the list.
  2. Then list all the URLs in that page by using Javascript’s document.links object.
  3. I noticed that the URI for the MP3 link is always the ninth, so just get the ninth URL: document.links[8].href.
  4. Using a regular expression, winnow the URL:
    document.links[8].href.replace(new RegExp('[?&=]','g'),' ').split(' ')[2]
  5. Drop in the javascript resource header, and voila! here’s the bookmarklet that will grab audio track’s URL for download. Right-click and bookmark the link. Or, drag and drop the link to the bookmarks toolbar.

Trivial desktop customization

I’m currently playing with Devil’s Pie, a utility that matches windows and window events to a set of rules similar to Emacs’ (yikes! :P) S-expressions.

I installed Devil’s Pie on my work desktop (running FC6), thus:

$ sudo yum install devilspie

(I have previously organized my desktop with four workspaces: for browsing, remote SSH sessions, remote desktop sessions, and other tasks.) I then created a configuration file:

$ mkdir .devilspie && vi ~/.devilspie/workspaces.ds
   (debug)
   (if (is (application_name) "Firefox") (begin maximize (undecorate (set_workspace 1))))
   (if (is (application_name) "Terminal") (begin maximize (undecorate (set_workspace 2))))
   (if (matches (application_name) "^rdesktop.+") (begin center (maximize (set_workspace 3))))

and invoked Devil’s Pie: devilspie -d ~/.devilspie/workspaces.ds &. The (debug) line in the configuration is, heh, for debugging purposes so Devil’s Pie will print out events and other information, which I can then later use.

Seems pretty straightforward, though there isn’t much functionality that I can use. (Then again, my requirement is minimal: I just want to group apps to different workspaces to avoid clutter.) I can then drop Devil’s Pie in my X startup script, along with the other startup apps.

‘Sumuway, maging mapangahas, magtanong, makisangkot’

Sleek video of the Kabataan Party, a partylist candidate for the Philippines elections in May 2007.

QOTD: ‘good riddance’?

Everything is far from being “broken” as you imply, and you will find that grass may not necessarily be greener on the other side — just different flavours of the same weed.

From the Fedora development mailing list, on Eric S. Raymond’s switch to Ubuntu. (Alan Cox has a more succinct reply.)

Info revolution, delivered by camels

Camel bookshop

The actual Camel Bookmobile brings books to semi-nomadic people in Northeastern Kenya who live with the most minimal of possessions, suffering from chronic poverty and periodic drought. I visited the region during a period of drought and made several hours-long walks through the African bush with the bookmobile. I cannot describe how moving it was to see the people, particularly children, crowding around as the traveling librarians set up straw mats under an acacia tree and spread out the books. The excitement is palpable.

Forget the OLPC for now, what the world’s children needs is to be able to read.

<sarcasm>
I bet corrupt education officials and suppliers will cash in on this, if ever this type of project will be implemented in the Philippines.
</sarcasm>