thereseason-com
January 11th, 2008There’s nothing here. Try here instead.
There’s nothing here. Try here instead.
Photo of a samurai sword from Wikimedia Commons.
The BBC news headlines on my translation website are compiled by a script that scans the BBC’s news feeds for keywords related to Japan.
Generally it works quite well without any help from me. But every couple of weeks, it coughs out a news story about some lunatic or other who ran amok with a “samurai sword”. Here’s the most recent example:
Samurai sword killing man jailed
A father of four who stabbed a man to death with an 18in (46cm) samurai sword has been sent to jail for a minimum of 18 years.
There are literally hundreds more stories like this at the BBC News website, and plenty more at the Google news website.

A “samurai sword” according to the media.
The Daily Mail covered the same story and even included a photo of the offending weapon, which I’ve reproduced here.
Let’s take a closer look at this thing. The blade was apparently stamped out from a sheet of stainless steel, and the handle is made of plastic. The blade is completely straight, and has holes running down the middle. I can only assume these were put in to make nice swooshy noises when you wave the sword around in the air.
Apart from being long and pointy, this has absolutely nothing in common with samurai swords. For a start, samurai swords are curved. They are manufactured by a complex and time-consuming process which was developed centuries before the development of die-stamped stainless steel production techniques. Or plastic, obviously. They don’t have swooshy holes. And they are very expensive. In Japan they are regarded as works of art.
In the UK, efforts are now being made to ban the sale of samurai swords. According to a rather ironic article on the BBC News website, the Home Office claims that samurai swords
…had been used in about 80 serious attacks in England and Wales since 2003 and it wants to target their distribution. People who carry the cheaply priced swords in public can already be charged with possessing an offensive weapon.
(Cheaply priced? I think not. The article continues…)
Genuine samurai swords used in ceremonial martial arts display or sought by collectors would be exempt.
So apparently samurai swords now have to be referred to as “genuine samurai swords”, because the term “samurai sword” now refers to a mass-produced die-stamped plastic-handled swooshy-holed stainless steel contraption of the sort normally wielded by certifiable lunatics.
There is nothing samurai about these swords at all. Wouldn’t it make more sense just to call them “swords”? Or is that just not sexy enough?
Are you fed up seeing 404 errors like this in your server logs?
... "GET /_vti_inf.html HTTP/1.1" 404 963 "-" "Mozilla/4.0
(compatible; MS FrontPage 6.0)"
... "POST /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 404 963 "-"
"MSFrontPage/6.0"
These non-existent files (_vti_inf.html, _vti_bin/shtml.exe, etc.) are found on sites created with Microsoft FrontPage and hosted on IIS servers. When a user requests these files, it usually means they’re trying to hack into your website by exploiting the numerous security flaws in FrontPage.
Since these files don’t exist on non-FrontPage websites, a “404 Not Found” error is generated every time a FrontPage file is requested. Not only does this clog up your error logs, but it also eats into your bandwidth allowance (especially if you use customized error pages).
To avoid this problem, I’ve started redirecting all these requests back to Microsoft’s own website. This is quite simple to do on an Apache server. Just insert the following into your .htaccess file:
<IfModule mod_alias.c>
RedirectMatch 301 (/_vti_bin.*$) http://www.microsoft.com$1
RedirectMatch 301 (/_vti_inf.*$) http://www.microsoft.com$1
RedirectMatch 301 (/MSOffice.*$) http://www.microsoft.com$1
</IfModule>
The next time someone requests /_vti_inf.html from your website, they wil be automaticaly redirected to microsoft.com. You can try it out here if you like. Just click on the following link and see where you end up:
http://midori.co.uk/_vti_inf.html
Yes, that’s more like it ![]()
I just wrote a Perl script to make backups of a mySQL database and email them to me whenever the content of the database changes. This ought to be useful for websites where the database doesn’t change too often. If you use a cron job to run this script once every 24 hours, then it will email you a backup copy of your database whenever anything has changed.
This script stores a gzipped dump of your database in a private folder which should only be accessible to you (If you don’t have a private folder, you can make one by CHMODding a folder with permissions of 700).
You might also find this to be a useful example of how to use Perl and sendmail to send an attachment by email.