Search this site





SuperHappyDevHouse 18 - review

This past shdh was my first. It wasn't what I expected; way more people showed up than I thought would show. Totally sweet.

There were 6 or so tables setup with chairs and power strips. Wifi. Someone setup a projector to display sniffed google/yahoo searches flying over the wireless. I was already doing my standard 'ssh -D8888 somewhere' and having firefox proxy over that.

The projector was displaying the decoded contents of search queries. My first work that day was on hacking the projected screen. The first one was hacking pushing search queries with wget(1) that had terminal control codes. After that, I figleted-things to the screen using figlet, awk, xargs, and wget. Some time later I got around to doing something way cooler. Basically, I had a script that would read every key stroke I typed, and send a search query consisting of a clear-screen sequence followed by the whole string I had typed. When I demoed it, I managed to convince some through assumption that I had owned the machine itself, and not that I was doing this all via search queries. Hehe, fun. Here's what I was using:

(stty raw; x=""; while true; do a="$(dd bs=1 count=1 2> /dev/null)"; if [ "$a" == "^H" ] ; then x=${x%?}; else x="${x}${a}"; fi; wget --read-timeout=.001 --tries=1 "^[[2J^[[0;0H$x"; done)

There was a large ruby-fan presence. Lots of people working on facebook apps, too.

If you didn't see the slurry of posts I made during shdh about code I was working on, here's a short list:

  • Got a prototype of jquerycmd working
  • Wrote a google maps direction scraper with jquerycmd
  • Wrote Makefiles for navmacro and xdotool that work without pkg-config
  • Started working on the urledit firefox extension
  • Implemented urledit with xdotool and a shellscript
Tons of code written. I had a good time, but next time I'm going to try for a more social approach instead of sitting in a corner coding like a fiend ;)

Firefox URL Editor extension - in progress.

The goal of this project is to allow me to edit any parameter in the url bar quickly, rather than having to scroll slowly and inaccurately across the single line that is the urlbar. This is extremely necessary when you're dealing with long urls.

jquerycmd+xpathtool == direction scraping on google

Show the first 3 steps that google maps tells you to take.
./ "atlanta to nyc" | head -3
Head southeast on Trinity Ave SW toward Washington St SW        0.2mi
Slight left at Memorial Dr SW   0.3mi
Turn left at Martin St SE       361ft
Pipe that to lpr and you've got printed directions on under 5 seconds.

Why not just do this with plain page scraping? Because there's lots of javascript in google maps that presents the user with the directions. Firefox (Gecko, really) already parses it, so why bother reinventing the wheel? Let's use the wheel that already works.

Download jquery-20070623.1828.tar.gz. The download of jquerycmd comes with the xul app, '' and ''.

For the lazy who just want to see the scripts:

At SuperHappyDevHouse 18

I've been working on the jquery commandline tool. The base features work, now all that remains is endlessly interating over adding features.
% ./ --url --query img
<IMG width='276' height='110' src='/intl/en_ALL/images/logo.gif' alt='Google' />
% ./ --url --query form
<FORM method='post' action='/query.php'>
        <div class="controls">
            <a href="/search?advanced">advanced search</a>
... < remainder cut > ...