Simon Willison’s Weblog

Subscribe
Atom feed

Blogmarks

Filters: Sorted by date

Lazy Load Plugin for jQuery. I’m using this jQuery plugin to save some bandwidth when people first view my Redis tutorial slides. It unobtrusively replaces images on a page with a placeholder graphic, then sets them to load automatically as the user scrolls down the page.

# 26th April 2010, 12:02 am / javascript, jquery, lazyload, performance, plugins

tempalias.com development diary (via) tempalias.com is a e-mail forwarding service that lets you create an address that will only work for a few days (or a limited number of messages) and will forward messages on to your real account. It’s implemented using Node.js and Redis and the code is released under an MIT license. Philip Hofstetter, the developer, maintained a detailed development diary throughout which is worth reading if you’re interested in Node.js.

# 23rd April 2010, 7:36 pm / email, javascript, nodejs, redis, tempalias

Ruby-style Blocks in Python. Yes, yes, yes, yes. A proposal for muli-line lambda support in Python that doesn’t trip up on significant whitespace. If this gets in before the proposed feature freeze I’ll be a very happy Pythonista. UPDATE: This is a post from over a year ago, and it looks like the proposal has since stalled.

# 23rd April 2010, 11:19 am / blocks, python, ruby

Introduction to nginx.conf scripting. Slideshow—hit left arrow to navigate through the slides. The nginx community is officially nuts. Starts out with a simple “Hello world” using the echo module, then rapidly descends down the rabbit hole in to array operations, sub-requests, memcached connection pooling and eventually non-blocking Drizzle SQL execution against a sharded cluster—all implemented in the nginx.conf configuration file.

# 21st April 2010, 11:40 pm / drizzle, http, memcached, nginx

The MessagePack Project. A cross-language efficient binary-based serialization library—“It’s like JSON, but very fast and small”. Claims to outperform protocol buffers for at least some benchmarks.

# 21st April 2010, 10:55 pm / json, messagepack, protocolbuffers, serialization

Blowing up HTML5 video and mapping it into 3D space. The canvas drawImage() method can take an HTML video element as its source, making all kinds of interesting effects possible. The author notes that performance was dramatically improved by copying the video frame in to a separate canvas element and then copying regions out of that element rather than grabbing regions from the video directly.

# 21st April 2010, 9:30 am / canvas, html5, seanchristmann, video

RAIC? What’s that? (via) “Redundant Array of Independent Cloud providers”. Solve the cloud lock-in problem by storing data with multiple different providers from the start.

# 20th April 2010, 8:43 am / cloud-computing, raic

jQuery special events. Ben Alman’s comprehensive guide to jQuery’s special events API, which allows you to register new kinds of events that can then be attached and detached using jQuery’s bind and unbind methods. Ben’s clickoutside event is a particularly useful example.

# 17th April 2010, 9:08 pm / ben-alman, events, javascript, jquery

Flask 0.1 Released. Armin’s Flask (a Python microframework built around Werkzeug and Jinja2) is looking pretty solid for a two week old project—extensive documentation, comprehensive unit test support (and example applications with unit tests) and some very tidy API design.

# 16th April 2010, 5:12 pm / armin-ronacher, flask, jinja, microframeworks, python, testing, werkzeug

Stack Overflow Blog: OpenID, One Year Later. Google’s support is a huge deal—61% of Stack Overflow accounts use Google. Google’s implementation of directed identity has caused problems though, since Google provide a different OpenID for each domain making it hard for Stack Overflow, Server Fault and Super User to correlate accounts. Their solution is to require a (verified) e-mail address from Google OpenID users using sreg and use that as a key for the accounts.

# 14th April 2010, 8:46 pm / directedidentity, email, google, login, openid, registration, sreg, stackoverflow

apache.org incident report for 04/09/2010. An issue was posted to the Apache JIRA containing an XSS attack (disguised using TinyURL), which stole the user’s session cookie. Several admin users clicked the link, so JIRA admin credentials were compromised. The attackers then changed the JIRA attachment upload path setting to point to an executable directory, and uploaded JSPs that gave them backdoor access to the file system. They modified JIRA to collect entered passwords, then sent password reset e-mails to team members and captured the new passwords that they set through the online form. One of those passwords happened to be the same as the user’s shell account with sudo access, leading to a full root compromise of the machine.

# 14th April 2010, 9:08 am / apache, incident, jira, passwords, security, tinyurl, urls, xss

Step for Node.js. A further iteration on the attempts to make callback-based programming in Node.js easier to manage, this time making clever use of the ’this’ keyword to represent the next callback in the chain.

# 13th April 2010, 11:02 am / callbacks, javascript, nodejs, step

Popular Science+. Matt Webb’s write-up of the Mag+ project, the platform behind the highly praised Popular Science+ iPad application.

# 12th April 2010, 1:06 pm / berg, design, ipad, magplus, matt-webb

What’s wrong with extending the DOM. Detailed explanation of the problems that crop up from extending built-in DOM objects using JavaScript, from Prototype developer kangax. Prototype 2.0 will be dropping this technique entirely—will MooTools follow suit?

# 11th April 2010, 10:03 pm / javascript, kangax, monkeypatching, mootools, prototype-js

jQuery UI: Trying to manipulate the position of a draggable mid-drag doesn’t seem to work. This has bitten me on two separate projects now—it’s the only problem I’ve had with jQuery UI’s draggables, which have otherwise been fantastic.

# 11th April 2010, 9:59 pm / draggables, dragndrop, javascript, jquery, jqueryui

Of Building Blocks, Rosetta Stones and Geographic Identifiers. Yahoo! GeoPlanet is now mapped to identifiers from other gazetteers such as GeoNames, FIPS and IATA—and those identifiers are available via the GeoPlanet API.

# 11th April 2010, 9:53 pm / geonames, geoplanet, geospatial, yahoo

twitter’s gizzard (via) Intriguing new open source project from Twitter. Gizzard is a sharding framework which provides a network service for partitioning data across arbitrary backend datastores, managing its own forwarding table to map key ranges to partitions and adding support for tree-based replication.

# 11th April 2010, 9:39 pm / gizzard, scaling, sharding, twitter

RFC5785: Defining Well-Known Uniform Resource Identifiers (via) Sounds like a very good idea to me: defining a common prefix of /.well-known/ for well-known URLs (common metadata like robots.txt) and establishing a registry for all such files. OAuth, OpenID and other decentralised identity systems can all benefit from this.

# 11th April 2010, 7:32 pm / oauth, openid, rfc, robots-txt, urls, wellknownurls

This is an outrage. Phil Gyford’s reaction to the reaction to the Digital Economy Bill. Ends on a positive note hoping that the online furor will result in more technology-minded people paying more attention to the UK political process.

# 11th April 2010, 7:25 pm / debill, economics, phil-gyford

Introduction to Surlex. A neat drop-in alternative for Django’s regular expression based URL parsing, providing simpler syntax for common path patterns.

# 11th April 2010, 7:23 pm / codysoyland, django, python, regex, surlex, urls

Flash CS5 will export to HTML5 Canvas. This looks pretty awesome—Illustrator CS5 and Flash CS5 can export to a new “FXG” format, and Adobe are providing a JavaScript library to load that format via Ajax and render the contents (including Flash animations) in a canvas element. Could be great for displaying newspaper infographics on the iPad.

# 11th April 2010, 6:33 pm / adobe, canvas, flash, fxg, html5, illustrator, ipad, iphone

Copyright is hard. Dan Catt spots Adam Liversage (Director of Communications for the BPI, and hence right in the middle of the DEBill) suggesting his wife violate copyright on Twitter.

# 11th April 2010, 2:26 pm / bpi, copyright, dan-catt, debill

GitHub: Announcing SVN Support. The best kind of April Fool’s joke: one that works. It’s read-only, but that’s good enough to support referencing GitHub repositories from SVN externals.

# 1st April 2010, 11:33 am / aprilfools, git, github, subversion

Plugging the CSS History Leak (via) Firefox is fixing the nefarious CSS visited link colour history leak flaw, which currently affects all browsers and allows a malicious site to determine if you have visited a specific site by checking getComputedStyle against a link to that page. It’s an obtrusive but necessary fix—visited link styles will be restricted to colour and border styles (no background images and hence no more checkbox effects since the image request could leak information) and those colours will not be reported via getComputedStyle. I hope other browser vendors follow suit.

# 31st March 2010, 8:01 pm / css, firefox, history, mozilla, security

Redis weekly update #3—Pub/Sub and more. Redis is now a publish/subscribe server—and it ended up only taking 150 lines of C code since Redis internals were already based on that paradigm.

# 30th March 2010, 3:15 pm / c, nosql, pubsub, redis

A Turing Machine. Someone finally built a real turing machine—and it’s beautiful. All calculations are carried out on a tape, which has 1s and 0s written on it by a robotic dry-erase marker. Hypnotic.

# 29th March 2010, 2:28 pm / hardware, hardware-hacking, turingmachine

Preview: Freebase Gridworks (via) If my experience with government datasets has taught me anything, it’s that most datasets are collected by human beings (probably using Excel) and human beings are inconsistent. The first step in any data related project inevitably involves cleaning up the data. The Freebase team must run up against this all the time, and it looks like they’re tackling the problem head-on. Freebase Gridworks is just a screencast preview at the moment but an open source release is promised “within a month”—and the tool looks absolutely fantastic. DabbleDB-style data refactoring of spreadsheet data, running on your desktop but with the UI served in a browser. Full undo, a JavaScript-based expression language, powerful faceting and the ability to “reconcile” data against Freebase types (matching up country names, for example). I can’t wait to get my hands on this.

# 27th March 2010, 6:43 pm / cleanup, dabbledb, data, freebase, gridworks, javascript, open-data

Random Guardian (via) A random page from today’s Guardian, built by Daniel Vydra.

# 26th March 2010, 4:47 pm / daniel-vydra, guardian, random

The Onion Uses Django, And Why It Matters To Us. The Onion ported their main site from PHP and Drupal to Django in three months with a team of four developers, including a full migration of their archived content. Their developers answer questions about the switch in this thread on the Django sub-reddit.

# 25th March 2010, 6:43 pm / django, drupal, php, python, reddit, the-onion

Video on the Web—Dive Into HTML5. Everything a web developer needs to know about video containers, video codecs, adio containers, audio codecs, h.264, theora, vorbis, licensing, encoding, batch encoding and the html5 video element.

# 24th March 2010, 12:50 am / audio, h264, html5, mark-pilgrim, theora, video

Years

Tags