Site Change Pending – Welcome to 2011

I managed to break this site the other day when the theme I’m using (Freshy 2) decided to use a different set of options. I obviously triggered it somehow, but I’ve no idea how – and then it all got confused about which options and CSS adjunct to use, and didn’t want to work with the customize plugin and… yeah, it all went a bit Pete Tong. Given that the Freshy 2 theme is unsupported and doesn’t really work that well past WordPress 2.7 (which is pretty legacy), it’s no wonder strange things have been just waiting to occur, but I’ve got it back to a semblance on sanity (as you might be able to tell since you’re reading this, and noticing it doesn’t look a million miles different from before – apart from comment threading, promise me you won’t look!). I even backed up the entire www folder three days before it all went to hell, but when I restored the backup it’s still shafted, so the Freshy options must be stored elsewhere (like in the database somewhere)… but anyway, I digress; it’s time to shake things up.

Kicking and Screaming

I started reading about CSS3 the other day, and began knocking up examples of all the cool things you can do with opacity and 2D transitions and stuff – and it’s awesome. I had absolutely no idea you could do such cool stuff without JavaScript or Flash, and if you apply it to the experience layer (as opposed to the core functionality layer), then even if people are viewing your site in older browsers it can gracefully degrade and leave those running some archaic IE variant none the wiser that should they be seeing the site in Chrome or FF5 or such it’s got a lot more swish. I might even try some HTML5 shenanigans…

This isn’t going to change the core content for the better (sadly), but if the medium is truly the message, then perhaps by giving the medium an overhaul and a good lick of paint I can emphasize the message to a certain extent.

I don’t want to even think about how much time I could waste on 3D transitions… the sky’s the limit, ya know?

Stepping Up

So, to get the site all sorted, I have a (not especially cunning) plan:

  1. Get an offline version of the site running locally so I can twiddle the hell out of it. [COMPLETE]
  2. Rip the Freshy theme to bits, and combine all the CSS and CSS adjucts (which get pulled in and override the core styles) into a single CSS file. [COMPLETE – 2011-08-08]
  3. Remove all the cruft from the Freshy CSS and PHP. And there’s a lot of it. Tons. [96% COMPLETE 2011-08-10]
  4. Rewrite the core layout utilising CSS3 and perhaps HTML5 elements to make it look beautiful. [60% COMPLETE 2011-08-09]
  5. Bask in the radiant glory of a modern, dynamic website. [PENDING]
  6. Write good articles =P [ARGUABLE]

Speaking of which, I’ll write an article on getting an offline version of a site running soon – it actually took me a couple of hours to get everything installed, configured, database suitably modified (to keep me on the local copy at all times) & imported into MySQL etc. But now I have, I don’t have to do surgery on a live site, and can thus afford to break the hell out of my local copy, because things tend to get a lot worse before they get a lot better, and this version will still be up and running in 99% “good enough” mode.

Honestly though, CSS3 is amazing – check it out. I can’t wait to see what I can come up with =D is two!

Well, in its WordPress incarnation it’s two at least – so hurrah! =D Birthday cake - two years old

In the two years since I brought the site back online it’s transitioned through shared hosting to my own VPS, been Stumbled-Upon enough to make the site-stats peak at nearly 200,000 hits per month, and all in served over half a million pages of how-to’s and shenanigans. Not bad going!

I’ve learnt a hell of a lot over the last year, and posted what I hope are a bunch of useful articles, but one thing’s become absolutely clear to me – and that’s that I can’t stick to my original goal of posting one thing a day. To write anything that’s really worth reading takes time, and sometimes I just don’t have it. Also, a couple of months ago I started working on my Ph.D, which means that a huge swathe of what was once free time is now study time. And that’s going to be the case for the next three years…

Still, I’m super-psyched to have to opportunity to study at all, it just means that with all that plus the day job plus family life means that, ya know, blogging opportunities are limited :)

But saying that, as part of my studies I have to get my head into a lot of OpenGL programmable-pipeline stuff, along with scene-graphs, a lot of OpenCV, Kinect-tech and other fun technologies, so I reckon I’ll definitely be able to whip up a whole bunch of neat how-to code that draws on the work I’ll be doing.

Monthly Hits - Year 2
Montly hits year 2 - StumbleUpon surge FTW ;)

Anyways, I just wanted to mark the occasion and to say thanks to my friends and family for being awesome and supporting me in every way I need it, and to the people who’ve found answers and left feedback on the site. I hope that the over the next twelve months I can bring the goods and write up some fun and inspiring stuff.

Cheers, y’all =D


How to: Use mod_rewrite to stop hotlinking in Apache

If you find that people are hotlinking to images on your site, and assuming you have mod_rewrite enabled and working, then just add the following to your root level (i.e. /var/www or such) .htaccess file to cut that crazyness right out:

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?the-name-of-your-site\.the-top-level-domain-of-your-site/.*$ [NC,L]
RewriteRule ^.*\.(bmp|tif|gif|jpg|jpe?g|png)$ - [F]

So, for example, on this site, I’m using:

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?r3dux\.org/.*$ [NC,L]
RewriteRule ^.*\.(bmp|tif|gif|jpg|jpe?g|png)$ - [F]

I’m just returning a [F] (forbidden) message to the hotlinking web server (so they don’t get an image returned to them), but you can always send them alternate images if you’re feeling vindictive… In fact, there’s lots of neat stuff you can do with mod_rewrite =D

P.S. For a full list of rewrite flags (i.e. [R,L,NC] etc.) and what they do, try this.,

Hiatus No More

You might have noticed that the site’s had a lot of pictures without a great deal of content over the last two weeks – this has been because I’ve been jetting around the world with the good wife (we went to Venice for a week, and then on to the UK for 10 days or so) and sadly I just didn’t have the time to write a bunch of tech articles and schedule them before I left.

I really didn’t want to advertise the fact that I’m away galavanting before I’d returned because i.) Nobody’s interested that you’re on vacation, and ii.) It only sends the message please burgle my house and hack my site – but now I’m back, the site managed to survive (including a StumbleUpon surge of about 50,000 hits over a few days – Hi Stumblers! ;)), and once I’ve got my affairs in order for the new school term I’ve got plenty of ideas for neat articles about lots of different things which I should be able to start putting together in the near future.

So, apols for the quite blatant image-as-post overdose and the slow response to any comments. Normal service will be resumed shortly once the jetlag stops kicking my ass.


Show Me The Money!

It’s possible that you’re not running adblocking plugins, and that you can see adverts on this page (and indeed every page) of this site. That’ll be because I put them there; I’ve sold out… Hurrah! =D

If you’re not seeing the adverts, then let me give you a screengrab to show some of the joy that you’re missing out on:

Yarg! Adverts!

Not that dramatic a change, is it? And these are the only two locations I’m going to use for ads – full stop. Ever.

The main reason that I’ve decided to sell my soul is that I had to switch hosting providers the other day because the bargain-basement VPS I’d signed up for gave me bargain-basement up-time (should have seen that one coming, shouldn’t I?) – so I’ve migrated the site across to a higher quality VPS with a company called, and guess what? It’s fast, stable, reliable, and has enough dedicated resources to handle the site including some room for growth, but the down side of you get what you pay for comes at the end of that particular truism – because it’s not particularly cheap…

Therefore, I’ve put two (count ’em!) adverts up through Google AdSense to try to recoup at least part of the couple of hundred bucks I’ve had to put in to keep the site up and running. I’ve selected to use targeted ads, so they should be something relevant to each page, and you’ll never see any diet-pills/viagra/political/religious or get-rich-quick schemes because they’re on my list of blocked categories. In fact, if you’re running ad-blocking software such as AdBlock Plus, you won’t even see the ads at all – and that’s fine too :)

I just thought that as I’m working part-time and studying, if I could get few bucks to throw in towards my hosting costs it’d leave me with a little more left over for blackjack and hookers textbooks and beer. And if I don’t make anything at all through them, then I’ll just suck it up and pay it all myself – no harm/no foul.

Just thought that if I could get the site to pay for itself by people occasionally clicking on an interesting or relevant ad or two, then all the better.


Update: I’ve moved the top banner advert which was in the header to the footer instead so it’s less prominent and you’re only ever going to come across it if you’ve read an entire page or article.