Apache is great. My latest discovery is mod_asis, which “provides for sending files which contain their own HTTP headers”. You just put the headers at the top of the file, separated from the content with a blank line.
Status: 200 OK
Content-Type: text/plain; charset=UTF-8
Last-Modified: Wed, 29 Nov 2006 08:12:31 GMT
Hello!
There’s nothing there you can’t do in your programming language of choice, but it’s far more elegant than, say, the PHP equivalent:
<?php
header('HTTP/1.1 200 OK');
header('Content-Type: text/plain; charset=UTF-8');
header('Last-Modified: Wed, 29 Nov 2006 08:12:31 GMT');
?>Hello!
It still seems pretty useless, but there are times when custom headers are important. At the very least, it’s a perfect fit for unit-testing HTTP clients.
For a more common example, consider the simple deletion of a file from a server. If you have no intention of putting it back, requests to that URL should return a status code of 410 (”Gone“), so clients know not to retry the request later. Apache has no mod_psychic to divine the webmaster’s intentions, and will return a less-useful 404 (”Not Found”). It’s a deliberately vague response, because the long-term status of the resource isn’t clear.
With mod_asis you can add index.asis to your DirectoryIndex directive as a drop-in replacement for index.*:
AddHandler send-as-is asis
DirectoryIndex index.html index.php index.asis
Or work some magic with (e.g.) MultiViews. Tada, a 410:
Status: 410 Gone
Content-Type: text/html
<html>
<head>
<title>Content Removed</title>
</head>
<body>
<h1>Content Removed</h1>
<p>Sorry -- this page of saucy H.P. Lovecraft limericks is gone and shan't be coming back. Cthulhu fhtagn!</p>
</body>
</html>
Okay, so in practice there’ll probably be an easier or better way, like Redirect gone or mod_rewrite with the G modifier, or having things handled automatically by your content-management system.
Still, it’s a nice tool, and you can never have too many of those.
I saw a post at MetaFilter about aluminium-can folk art and decided to have a go. It turned out to be easier than I thought.
The metal is thin enough that it’s trivial to cut with tin snips or even regular scissors; a ruler and a knife are good for straight lines. I used a regular Stanley knife with a segmented blade and had no problems other than the expected blunting.
Removing the top and bottom of the can without accidentally crushing it is the hard part, and even that isn’t very hard. Filling the can with water and freezing it might help there, especially if using a saw.
That leaves a sheet of metal:
Once the jagged edges are taken into account, you should be able to get a usable sheet of at least 20cm by 8cm.
It’s quite an anticlimax, actually, because you work with the aluminium in almost exactly the same way as with paper or cardboard; it’s just harder to cut and harder to glue. (Staples work fine.) It also can’t withstand repeated stress from folding, so origami is out of the question, but it’s well-suited to cut-out models that don’t require repeated folds. In exchange, you get something that can survive harsh conditions. If you leave the outside of the can visible, you might even get a little pop-culture cachet.
This is what I ended up with:
(And a few more.)
Nothing impressive compared to what other people have produced, but that was always a given: someone has already built an entire house.