Silly server
I recently applied for a job and they wanted some URLs of examples of my work. At the same time my server went down :( But it’s up again now obviously.
I recently applied for a job and they wanted some URLs of examples of my work. At the same time my server went down :( But it’s up again now obviously.
I just got the new (well it’s not that new now) Timesplitters game for the PS2, and wow is it cool.
It’s sort of a cross between Timesplitters 2, Halo and the Goldeneye sequel on the N64 (Perfect Dark?). Think Timesplitters 2 but add the ability to get into vehicles and separate grenades and deployable guns. The graphics are improved and are less cartoony but the whacky sense of humour is still there - whenever you kill a monkey it shouts “Chimpicide!”.
Not much to say except, yay, it’s December.
For anyone outside the UK, I’m referring to the digital TV broadcast by British Sky Broadcasting (if that is still their name).
They are stuffing far too many channels on there and as a consequence the quality is dropping. Before, you could occasionally see compression artefacts on the images, now they are everywhere. It’s especially noticeable with full screen changes when it’s dark. And once you know what it looks like it is impossible to ignore.
I have a scary theory though. Next year they are going to release SkyHD - basically Sky transmitting a High Definition signal. Now if they compress the channels the way they are now then it really won’t help since compression artefacts look worse at high resolutions. Unless the reason they are compressing channels is to fit higher bandwidth HD signals in. Or they could be doing it intentionally to exaggerate the gains from HDTV…
I’ve started editing more on Wikipedia. Not entirely sure why, but it’s quite fun.
If you don’t know what Wikipedia is, it’s a free online Encyclopedia that is editable by anyone. Also all the content is completely redistributable providing the license is kept with it. It’s theoretically multilingual too but only a handful of languages actually have content to rival print Encyclopedias. But the others are coming along.
I’ve also written a couple of articles that I don’t really know anything about - I just distilled stuff from various online sources. It’s easier than I thought too.
You may have noticed that all the tags on my posts point to URLs of the form /ob-search/_search+term_
. That’s a reasonably simple bit of mod rewriting. This article is aimed at people who can do that.
I wanted a way for the search box to point to the same pages. I figured I could point the search form at a fake page and redirect (it with a HTTP status code of 302 so it is sent to the browser and the user sees it in his/her address bar) to the nice URL (which would secretly redirect to the real one).
So I came up with the following:
RewriteRule ^fake-search.php?s=(*.)$ /ob-search/$1
It didn’t work. Unfortunately Apache strips of query strings before the get to Rewriting and the reattaches them. So to sort it out I had to hack off the query string with one rule (which is accessed using an environment variable) and then extract the bit I wanted with another rule:
RewriteRule fake-search.php /-%{QUERY_STRING}?
RewriteRule ^/-s=(.*)$ /ob-search/$1 [R=302]
RewriteRule ^/ob-search/(.*)$ /index.php?s=$1
The third rule just does the “simple” redirecting as a said in the beginning.
The ?
appending the query string on to the end afterwards. The hyphen in the first two lines could be anything you want - it’s just something for the second rule to recognise.
To finish it off I altered the search form’s action
attribute to point to fake-search.php
and all was well :) Try it :D
For those of you who don’t know, Wordpress.com is a Blogger type service run by the creators of Wordpress based on Wordpress.
I have to warn you I have no experience using Wordpress.com, and these comments are based on what I’ve heard.
There have a been comments about how theme support in Wordpress.com is very limited since they obviously can’t let people run arbitrary PHP code. I’m not sure what they do let you do but there is a way that will give almost the power of normal Wordpress templates.
I got the idea from Wordpress referring to it’s template markup as tags (since they’re enclosed in <?php ... ?>
). Why not actually use XML tags that correspond to the Wordpress functions? These simpler themes could be transformed into real themes for Wordpress that the user never sees. If they were parsed with regular expressions and went through a callback they could be vetted so only real Wordpress functions are let through. Although it would have to be done carefully for security, it should be fairly straightforward.
So for instance, instead of <?php the_author() ?>
you’d have <wp:the_author />
.
I’ve finally fixed the template. I didn’t realise that the damn thing was switching background images depending on whether this was a single post or not (I added the sidebar to all pages you see).
Quite old by now but still amazing to see: a reasonably long blog post in which every single word links to a different blog. Quite an achievement. Jeff Blanco
Google have a new project that could well replace half of their services, Google Base.
It’s a rather vague project designed to pursue their goal of organising the world’s information in the most direct way possible. Anyone can submit (almost) any information they want along with various attributes and labels describing the information and Google will make it searchable.
In theory Google Sitemaps and Froogle could just became specific version of this idea. The only limits on can be uploaded are fairly obvious matters of “decency”. Adult material does seem to be a allowed in general. The most eye catching item not allowed: “Posting is not permitted for the promotion of body parts or human remains.”