Update: The keynav hack for X11/Xorg/XFree86 can be found here
This event was absolutely beyond any of my expectations.
I was expecting a Mashup Camp-style event with a hundred or so people. I
certainly wasn't prepared for the event. Heck, I knew very little about the
event before showing up.
Entertainment and Hospitality
Beck.
Beck.
And more Beck.
Beck put on one of the best shows I've ever seen. The crowd was about 500
strong, I'd guess. The stage effects had the help of Puppetron,
who synchronized marionettes of the band with the band's movement. Very cool. A
summary of what Beck did during this concert can be found in a review
of another Beck concert. Bears on stage. Seriously. Awesome.
To quote Beck Puppet, "I'm about to hack a bitch." Puppetron and Beck did a sweet
hack video for the event.
Other hospitality perks included many kegs of beer, tons of pizza, fifty-six
dozen Krispy Kremes for breakfast, and an extremely well organized staff.
Before the event
One of the rules of the event is that you ought to invoke one or more of the
available Yahoo! web API's in your code sorcerery. Prior to arriving, I wasn't
sure I wanted to do a web-based hack, so I was planning on not using any of the
APIs. I also showed up with no ideas. Hacking without a plan? Seemed to work
out. I found out at sometime around midnight during the event that there would
be prizes for the best hacks. My hacks would clearly not qualify, but whatever,
I was here to hack :)
Hack Day
I started with working on my binary screen partitioning tool. I
haven't found a good way to explain this application in words yet. Look at my
slides (link at bottom of this post) and it'll show you a screenshot-based
demo. I added a bit of more polish to it. I got bored after I ran out of code
to write, so I offered coding services in exchange for not being bored to Kevin
Marks.
Idea bouncing led to me playing with the del.icio.us API. The end result was
something I term "jokeware" - a filesystem driver for storing real files in
del.icio.us. It was built as a joke just for the sake of trying it. It worked.
The more technical details can be found in my slides. If you want to look at
the code, you'll have to use a decent webbrowser that supports "data:" urls.
View "tastydrive.py" on http://del.icio.us/jlshackday/tastydrive.
And, yes. I am actually storing raw data in del.icio.us. It's a hack, and I
think it's hilarious. It's not fast enough to use to store anything meaningful.
Personally, I think my two projects are totally slick. Read about them on my slides:
My Slides for Hack Day '06
I can't remember all the hacks I liked, but those I remember are here:
- Purse Hack. Pedometer + microcontroller + camera. Takes pictures every 100 steps.
- monologr(sp?) - record an audio stream while selecting images from flickr
to create slideshow with an audio story.
- YahooSpace - bridge Yahoo 360 with MySpace. Society is doomed.
There was press everywhere at this event. Yahoo's PR folks did a
fantastic job of selling the existence of the event to the press. Local news,
Wall Stree Journal, etc. Journalists for publications as far as Germany were
here. At the end of the hack session, news coverage was shown on the projector.
Atleast three news channels covered the event.
The event was a huge success. To any of you Yahoo folk reading: Thanks for an
incredible event. Same time next year? ;)
Comments: 9 (view comments)
Tags: hackday06, travel, hacking, geeking out
Permalink: /geekery/yahoo-hackday-06-part1
posted at: 22:40
The Interface elements plugin for jQuery is super slick. It has a puffer function I want to use. However, the act of 'puffing' makes the element disappear. I want to clone the element and puff the cloned version.
function magicpuff() {
$("img").mousedown(function() {
pos = findPos(this)
left = pos[0];
top = pos[1];
puffer = this.cloneNode(true);
puffer.style.left = left + "px";
puffer.style.top = top + "px";
puffer.style.position = "absolute";
$(document.body).append(puffer);
$(puffer).Puff(1000, function() { $(puffer).remove() });
return false;
})
}
$(document).ready(magicpuff);
This code will duplicate the image clicked placing it directly on top of the
old element. It then puffs the new element and removes it when the puff has
completed. Simple enough.
What good is code without a fun little demo? View the puffer demo
I should note that it seems that the remove portion doesn't always remove the
cloned object. This is especially noticable (though, not visually) when you
activate puffing on more than one image at a time. You need somewhat fast hands
to do this. Firefox's DOM inspector will show you the additional elements
parented by the body tag.
This depends on findPos
available from quirksmode, jQuery, and the forementioned Interface
plugin.
Comments: 5 (view comments)
Tags: jquery, javascript, ui, pimp
Permalink: /geekery/jquery-interface-puffer
posted at: 00:01
I'm in the process of feeling out my options for the pimp rewrite. I've started with Pylons. Pylons gives me an actual framework and lets me choose implementations.
The database back is going to be SQLObject. I've been playing with it for 10 minutes. I haven't written a single line of SQL, and I've already got objects mapping to an sqlite database. Insertion is so cool. I simply instantiate an object and it gets inserted to the database. The potential to write database-backed systems without having to understand SQL is quite cool.
Neat. More on sqlobject as I learn it?
Comments: 0 (view comments)
Tags: python, sql, databases, rdbms, ordb, sqlobject
Permalink: /geekery/sqlobject
posted at: 21:35
Now that I'm nearly settled in my new apartment, I need to start working on some new, cool projects to make it better.
- pimp, version 5
- Pimp v4 was my excuse to learn python. It's great, but needs serious
work. Now that I know python better, I think it's time to revisit this
project with a complete rewrite. Reinventing the wheel isn't always good, but
it's a fun exercise and certainly a useful project.
- web-based home automation
- Home automation kits are extremely expensive. I'm hoping to leverage
LIRC, my X10 equipment, and the web to create a one-shot portal for
controlling most of the devices in my apartment. The end-goal is to be able
to click a button and have the TV switch to "input 3" and tell my receiver to
switch to "dvd". Perhaps some sexy light dimming or something, aswell, with
my x10 stuff. Mostly with one or two button clicks.
If you've got lirc experience, let me know. I'm looking to build both a
receiver and transmitter. Receiver for recording IR signals from my other
remotes and the transmitter for obviously replaying those signals.
Other hacks will probably include low-tech ones to hide wire mess, etc.
Comments: 0 (view comments)
Tags: apartment, moving, hacks
Permalink: /geekery/apartment-projects
posted at: 21:13
I use firefox as my primary web browser. I have for a number of years. Lots of things about it irritate me. Today's irritation is it's startup sequence.
You kids can play at home too! Do this:
tcpdump -np 'port 53'
Now, start firefox fresh. Watch it do a dns lookup. Now do something to disable
dns, such as pointing dns at an invalid server, or adding a search suffix to
your dns client such that your hostname.suffix does not exist. Start firefox
again. Watch it do a dns lookup on yourhostname.suffix and FAIL MISERABLY. What
do we do in case of dns failure? Let's wait on DNS!!! WOOT. Except, dns never
comes back. So, let's never start.
God damnit this is annoying.
Comments: 0 (view comments)
Tags: firefox
Permalink: /rants/firefox-sucks
posted at: 00:21
I have a machine that runs X but doesn't listen to inet connections (via -nolisten-tcp). What if I want to use x2x to this machine? Simple.
ssh -tY thatmachine 'x2x -from $DISPLAY -to :0 -west'
This will ssh to 'thatmachine' and forward X. This set's $DISPLAY on the remote machine, which you can then invoke x2x with specifying 'from' as $DISPLAY. This has the same effect as invoking:
x2x -to thatmachine:0 -west
Except you don't need to allow tcp X connections. :)
Comments: 0 (view comments)
Tags: onliners, x2x, x11, productivity
Permalink: /oneliners/x2x-remote
posted at: 03:38
So, I have a pptp vpn server running in my apartment. I desire this setup:
I VPN to my apartment. *All* traffic will go through this vpn
PPP has features to negotiate IP-level information such as DNS and "Here's your
IP" using IPCP. However, it doesn't seem to be able to share routes. However,
my local ppp.conf can say add default HISADDR and suddenly all my
traffic wants to go through the vpn. However, once I do this, I lose all
connectivity to the vpn because it is off-subnet - my machine forgets how to route data to the vpn, oops!
Is there a way to have ppp add an additional route that I want? Specifically, I
want to take the existing known gateway (say, my wifi gateway) and do:
add [vpnhostname] [currentroute] and then add a default route for
the tunnel. This will allow all traffic to want to go through the tunnel, but
still allow the OS to know how to *get* to that tunnel.
A hacky solution involves some pre-vpn discovery. I need to figure out what my
default route is. Once I know that, I can simply add a single line in my
ppp.conf and I have all traffic routing through my apartment.
add myvpnhostname mycurrentdefaultroute
add default HISADDR
These two lines create 2 routes. The first keeps the system aware of how to
reach the vpn server. The second ensure a default route to the vpn gateway.
While this is suboptimal, it is easy to automate. My vpn script can simply
generate a new ppp.conf and grab the default route with:
nightfall# netstat -rn -finet | awk '/^default/ { print $2 }'
192.168.55.254
Comments: 0 (view comments)
Tags: security, vpn, pptp, ipcp, networking, tunneling
Permalink: /geekery/vpn-troubles
posted at: 02:14
If you get this error:
Traceback (most recent call last):
File "/usr/local/bin/scapy", line 10647, in ?
class Conf(ConfClass):
File "/usr/local/bin/scapy", line 10670, in Conf
iface = get_working_if()
File "/usr/local/bin/scapy", line 2067, in get_working_if
except pcap.pcapc.EXCEPTION:
AttributeError: 'module' object has no attribute 'pcapc'
This is becuase you aren't running scapy as root. Run it as root.
If you still get this error message, it's likely due to pcap failing to find usable network interfaces. This means you have no interfaces in the UP state. It doesn't count lo0 as a real interface, I guess?
Comments: 0 (view comments)
Tags: scapy, python
Permalink: /geekery/scapy-error
posted at: 09:29
This October will bring a 48-hour hackathon organized by the
League of Technical Voters. If you can find your way to Austin, Texas in
mid October, then you should sign up and be there.
If you know PHP, then you can probably help code. If you don't know PHP, but know how to code, and still want to help, you can probably still help code! If you don't program, but still want to help out, you can do that too!
The goal of the hackathon seems to be development of Drupal modules to aid the
league site in becoming a meaningful and useful portal for political
discussion.
If you're interested in attending, learn more on the
league event wiki
Comments: 0 (view comments)
Tags: travel, lotv, politics
Permalink: /geekery/lotv-lockin
posted at: 01:37
Selenium cannot be used to test remote sites becuase browsers have cross-site
scripting protection which prevents you from modifying the content from other
domains. What happens when we fool the browser into believing content comes from a given domain? An extremely simple squid configuration can do just this.
I wrote one test. This test visits technorati's homepage, searches for
'barcamp' and verifies that a text string exists on the search results.
Steps:
- Tell Firefox to use my squid proxy as an HTTP proxy
- Visit http://www.technorati.com/_selenium/
- Run the tests
Simple, right?
The squid proxy intercepts any requests for '/_selenium' and redirects them
internally to my selenium web server. This has been tested in IE, Firefox, and
Safari with 100% success over vanilla http. HTTPS probably doesn't work for
obvious "Duh, it's encrypted" reasons. Squid can fix this aswell with ssl
reverse proxying.
If I run my single test, the result is something that looks like the following
(Firefox and IE, respectively):
Comments: 0 (view comments)
Tags: selenium, squid, web, testing
Permalink: /geekery/squid-selenium-dance-party
posted at: 03:39
|
Search this site
Navigation
Metadata
Home
About
Resume
My Code (SVN)
ARP Security
Dynamic DNS with DHCP
OpenLDAP+Kerberos+SASL
PPP over SSH
SSH Security: /bin/false
Week of Unix Tools
Work Efficiency
fex
firefox tabsearch
firefox urledit
grok
keynav
liboverride
newpsm (FreeBSD)
nis2ldap
pam_captcha
poor man's backup
Solaris audio utility
xboxproxy
xdotool
xmlpresenter
xpathtool
misc scripts
Presentations
Yahoo! Hack Day '06
Unix Essentials
Vi/Vim Essentials
Tag Cloud
Calendar
Friends
BarCamp
Kent Brewster
Tantek Çelik
John Resig
Wesley Shields
Tyler Shields
Technorati
|