Simon Willison’s Weblog

Subscribe
Atom feed

Blogmarks

Filters: Sorted by date

CookBookNewFormsFieldOrdering. Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict).

# 27th June 2008, 1:02 am / django, newforms, python, tip

BUG: XSS Security flaw in BaseCamp Messages (via) BaseCamp lets users include HTML and JavaScript in messages, on the basis that anyone with a BaseCamp account is a trusted party. I’m not convinced: you could use this to circumvent BaseCamp’s access control stuff and read messages you’re not meant to. On the flip side, you could also use this to add brand new features to BaseCamp by using JavaScript in a message as a server-side equivalent to Greasemonkey.

# 26th June 2008, 9:39 am / 37-signals, basecamp, greasemonkey, javascript, security, xss

mod_rpaf for Apache. A more secure alternative to Django’s equivalent middleware: sets the REMOTE_ADDR of incoming requests from whitelisted load balancers to the X-Forwarded-For header, without any risk that if the load balancers are missing attackers could abuse it to spoof their IP addresses.

# 24th June 2008, 5:02 pm / apache, django, http, load-balancing, middleware, modrpaf, rpaf, security, xforwardedfor

Oxford Geek Night 7: 25 June 2008. I won’t be able to make this one, but a reminder for anyone in the area that the seventh Oxford Geek Night takes place tomorrow night at the Jericho Tavern.

# 24th June 2008, 2:55 pm / events, oxford, oxford-geek-nights

Django snippets: Command to dump data as a python script. Extremely useful—dumps the data for an application as an executable Python script which will re-import it in to another database without any risk of colliding with existing IDs, sorting out foreign keys along the way.

# 24th June 2008, 12:07 pm / django, django-snippets, import, python

The basics of creating a tumblelog with Django (via) Ryan Berg suggests having a StreamItem model that links uses a GenericForeignKey to link to other content types, then using signals to cause a StreamItem to be created for every other model type. I should switch to doing that on this blog: at the moment I have to query three separate tables to build the tumblelog part which results in messy code for ordering and pagination.

# 24th June 2008, 11:09 am / contenttypes, django, genericforeignkey, python, ryan-berg, tumblelog

Tailor. “Tailor is a tool to migrate or replicate changesets between ArX, Bazaar, Bazaar-NG, CVS, Codeville, Darcs, Git, Mercurial, Monotone, Subversion and Tla repositories.”—written in Python.

# 24th June 2008, 9:59 am / bazaar, codeville, cvs, darcs, dvcs, git, mercurial, monotone, python, subversion, tailor, tla, version-control

Removing Microformats from bbc.co.uk/programmes. “Until these issues are resolved the BBC semantic markup standards have been updated to prevent the use of non-human-readable text in abbreviations.”

# 23rd June 2008, 9:04 pm / abbr, accessibility, bbc, microformats

jsontime. Nat and I threw this together this morning—it runs on Google App Engine and exposes Python’s pytz timezone library over JSONP.

# 21st June 2008, 7:07 pm / api, google-app-engine, javascript, json, jsontime, projects, python, pytz

Arbitrary code execution vulnerabilities in Ruby (via) Sounds nasty—integer overflows and unsafe allocs leading to memory corruption. Definite DoS and possible code injection as well. Upgrade to Ruby “1.8.5-p231, or 1.8.6-p230, or 1.8.7-p22” ASAP.

# 21st June 2008, 8:44 am / ruby, security

Comic Sans, the Film. “A documentary film coming soon”

# 21st June 2008, 12:27 am / comicsans, film, funny, typography

We’re all ops people now. Edd’s experience reflects my own: the kind of systems I’m building these days involve way more than just development, they often involve significant sysadmin type skills as well. Desperately need to get better at that stuff.

# 20th June 2008, 9:02 pm / edddumbill, ops, sysadmin

What is it like to write a technical book? Plenty of food for thought from the lead author of the new edition of High Performance MySQL. It’s amazing how Word is still an integral part of most technical book projects despite its obvious inadequacies compared to a toolchain based on plain text files and Subversion (the Django Book used ReST and Subversion to great effect).

# 20th June 2008, 8:18 am / baron-schwartz, django, plaintext, rest, subversion, word, writing

When Bugs Collide: Fixing Text Dimming in Firefox 2. Handy tips from Drew on fixing the glitchy text rendering in Firefox 2 when you animate opacity without breaking alpha-transparent PNGs in IE6.

# 19th June 2008, 6:09 pm / browsers, bugs, css, drew-mclellan, firefox, firefox2, ie6, javascript, jquery, opacity, pngs

PortingDjangoTo3k. Martin von Loewis has started assembling a patch. His write-up illustrates some key differences between Python 2.X and Python 3—it looks like Django’s unicode handling is going to require the most work.

# 19th June 2008, 5:53 pm / django, martin-von-loewis, python, python3k, unicode

Kellogg’s™ Lego® Fruit Flavored Snacks (via) On the one hand, from a child safety point of view this is clearly one of most stupid product ideas in recent history. On the other hand, I really, really want some.

# 19th June 2008, 8:38 am / kelloggs, lego, pennyarcade, safety

ncache. A squid-style caching system built on top of nginx. Supports the HTTP PURGE method for cache invalidation.

# 18th June 2008, 8:09 pm / cache, http, ncache, nginx, purge, squid

Reddit release their codebase. Under the same Common Public Attribution License used by Facebook for their recent source release.

# 18th June 2008, 2:32 pm / cpal, open-source, python, reddit

James Bennett: Why HTML. Finally, somewhere to point people when they ask why I avoid XHTML that’s a bit more up to date than Hixie’s rant from 2002.

# 18th June 2008, 12:27 pm / hixie, html, ian-hickson, james-bennett, web-standards, xhtml

Scaling your website with the Perlbal web server (PDF) (via) Perlbal documentation is pretty thin on the ground; this is a really useful introduction from Frank Wiles.

# 17th June 2008, 10:39 pm / frank-wiles, load-balancing, pdf, perlbal

New foundation for Django. Django now has its own nonprofit software foundation (courtesy of a bunch of tough paperwork by Jacob Kaplan-Moss), and fittingly the Lawrence-Journal World get the exclusive.

# 17th June 2008, 5:16 pm / django, jacob-kaplan-moss, ljworld, python, dsf

How not to apply for a job. Quite reasonably, 37signals care if job applicants get their wordmark right. Having worked for Yahoo! I know how important that ! is. What really winds me up is companies that aren’t consistent with name capitalisation across their own sites—many startups are guilty of this.

# 17th June 2008, 8:22 am / 37-signals, jobs, spelling, wordmark, yahoo

Deep Profiling jQuery Apps. Neat plugin from John Resig that monkey-patches most (all?) of the jQuery methods to build up a detailed profile of which methods are being used by a given page.

# 16th June 2008, 10:20 am / javascript, john-resig, jquery, profiling

Comet (programming) on Wikipedia on 4th June 2008 (via) The last useful version (which I had pointed many people to) before it was gutted down to just a couple of paragraphs by infuriating deletionists.

# 16th June 2008, 9:34 am / comet, deletionist, wikipedia

Wikipedia:Canvassing (via) Apparently it’s considered bad form to tell people about debates occurring on Wikipedia (such as votes for deletion). Looks like a policy designed to discourage the participation of subject experts in favour of the participation of Wikipedia process gnomes.

# 16th June 2008, 8:23 am / canvassing, wikipedia

Camouflage. My other key piece of OS X presenting software—hides all of the icons on the desktop (no need to drag them all in to an “Archive” folder every time I give talk).

# 15th June 2008, 6:29 pm / camouflage, macos, presenting, software

Caffeine. I’ve been using this for several months and I love it: it’s a simple OS X menu bar icon that lets you prevent your Mac from dimming the screen, going to sleep or starting a screen saver. Perfect for giving presentations and watching Flash movies full screen.

# 15th June 2008, 6:27 pm / caffeine, macos, presenting, software

Years

Tags