E-Scribe : a programmer’s blog

About Me

PBX I'm Paul Bissex. I build web applications using open source software, especially Django. Started my career doing graphic design for newspapers and magazines in the '90s. Then wrote tech commentary and reviews for Wired, Salon, Chicago Tribune, and others you never heard of. Then I built operations software at a photography school. Then I helped big media serve 40 million pages a day. Then I worked on a translation services API doing millions of dollars of business. Now I'm building the core platform of a global startup accelerator. Feel free to email me.

Book

I co-wrote "Python Web Development with Django". It was the first book to cover the long-awaited Django 1.0. Published by Addison-Wesley and still in print!

Colophon

Built using Django, served with gunicorn and nginx. The database is SQLite. Hosted on a FreeBSD VPS at Johncompanies.com. Comment-spam protection by Akismet.

Pile o'Tags

Stuff I Use

bitbucket, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, Markdown, Mercurial, OS X, Python, Review Board, S3, SQLite, Sublime Text, Ubuntu Linux

Spam Report

At least 236429 pieces of comment spam killed since 2008, mostly via Akismet.

A weather site in six (declarative) lines

For several years I maintained a hodge-podge of little web-based utilities at toolbot.com. Recently I decided to wipe the slate clean, bringing things back selectively. One of the few that I missed personally was my weather site. It returned National Weather Service forecasts in response to compact URLs of the form weather.toolbot.com/05667, for any five-digit US zipcode.

Originally, the site worked by scraping plaintext forecast files on the NWS servers. Eventually those went away; I looked at and gave up on the arcane (to me) SOAP interface that superseded them. All I wanted was a damn weather forecast, without ads, via an easy-to-type-no-matter-where-I-am URL.

I brought it back without writing a line of procedural code. You can click the link above to try it. Here's the entirety of the Apache configuration for this host (I use wildcard subdomains, so there's no DNS configuration step).

<VirtualHost *>
ServerName weather.toolbot.com
ServerAlias wx.toolbot.com
RewriteEngine On
RewriteRule ^/(\d{5})$ http://forecast.weather.gov/zipcity.php?inputstring=$1
</VirtualHost>

A cheap hack, but a useful cheap hack. Steal my code and create your own private weather redirect today! (Or just use mine.)

Tuesday, February 12th, 2008
+ + +

Comments are closed for this post. But I welcome questions/comments via email or Twitter.