Skip to content

Blog

XHTML 1.1 Compliant Feedburner Email Subscribe

Like many, I use FeedBurner to handle the RSS feeds for this blog, which gives me the benefit of all of FB’s special features, including detailed statistics on my feed’s usage.

I also make use of its email subscription service to allow people not familiar with feed technology to subscribe to the blog and have updates delivered to their inbox (Publicise > Email Subscriptions in your FeedBurner account).

My recent redesign means that my pages are now served as XHTML 1.1, rather than 1.0 Transitional*.

The code that I use in the sidebar to show the email subscription box (the code provided by FeedBurner) won’t validate under XHTML 1.1, though, which annoyed me. So, I fixed it.

You may wonder why anyone in their right mind would care if a little snippet of code doesn’t quite validate, since it doesn’t make any user-visible difference. Aesthetics are one reason and also some mobile browsers can be really fussy about validation.

So here’s how to use my fixed code if you want to have the email subscribe feature - but also have valid XHTML 1.1 markup.

First of all, log in to FeedBurner, click the relevant feed and go to Publicise > Email Subscriptions. Under Subscription Management, there should be a box with the default code, which should be something like this (line breaks added by me for readability):

» Read the rest of this post…

How to rip YouTube videos to your computer using UnPlug

UPDATE: This still is fine for 2.0.0.x, but UnPlug does not run properly on Firefox 3 and later, so if you’re on 3.0, this unfortunately will not work.

Firefox extension UnPlug is a very useful tool for extracting embedded video from all sorts of websites.

It can be a bit alien to work out how to use at first though, so I’ve put together a quick video of just over a minute that walks you through the process. It assumes you’ve already got UnPlug installed and loaded into Firefox.

Installing the Cherry CyMotion Master Linux keyboard drivers under Linux

I’m the proud owner of a Cherry CyMotion Master Linux keyboard. It’s a great keyboard, and it has loads of extra buttons that come in really handy. Well they do, if you can install the driver software that controls them under Linux.

Clean KeyboardClean Keyboard Hosted on Zooomr

I have a CD that came with the keyboard which includes a Fedora Core 4 RPM, a SUSE RPM and a .deb I think. Back when this machine was running FC5, the Fedora Core 4 RPM would load fine into the system and that way I could use the cool extra keys.

However, when I upgraded to Fedora Core 6, the FC4 RPM would no longer install (and it went into just a little bit of RPM hell).

It wasn’t until recently that I discovered that the source code for the key utility is actually GPL’ed and is available for download from the Cherry site (found on this page).

This basically solves the problem, as once you’ve got the source code, you can build it yourself and not depend on some dodgy semi-incompatible binary package.

» Read the rest of this post…

MacFUSE and SSHFS

One of the things I love about KDE, my primary Linux desktop environment, is a technology called KIOSlaves. When you’re using it to connect to a remote server over SSH with SFTP for example, all your KDE applications can access files on that remote system exactly as if it was a local disk.

Now that I’m using Mac OS X a fair bit of the time too, I wanted to duplicate this kind of functionality (using OS X’s native applications and not KDE ones running under the operating system).

Thankfully, MacFUSE and SSHFS solve this problem, by allowing you to mount a remote server (using SSH file transfer) as a volume in the Finder. Just like with KIOSlaves, all your Mac apps (and even non-native ones) can read and write over the network as if it was a local file.

So, here’s a quick primer on how to install it.

Head over to the MacFUSE Google Code page and go ahead and download the MacFUSE Core package (at the time of writing, version 0.2.2).

Open up the disk image and run the installer by double-clicking the pkg file.

MacFUSE DMG

You will need to reboot after installation, as MacFUSE adds a kernel extension (don’t worry though, it’s all free/open source under the BSD licence so there should be no nasty stuff, hopefully).

Once you’ve rebooted, head back to the Google Code page and go to downloads. Grab yourself the latest version of sshfs (right now, that’s 0.1.0).

Once again, open up the disk image. This time, just drag the application to your /Applications folder (or wherever you want).

Now, run the application and fill in your details. Click Connect and a couple of seconds later, you’ll need to enter your password (or key passphrase). Finally, your mounted SSH drive should appear on the desktop and in the Finder (make sure your Finder preferences are set to show ‘Connected servers’).

SSHFS window

And that’s it! You can hack away over SSH with full application integration. When you’re done, simply eject the network drive like you would any other and you will be safely disconnected.

It’s actually really awesome - and surprisingly easy. A couple of caveats you need to be aware of, however:

  • While this doesn’t happen for me, you might end up accidentally planting loads of OS X metadata all over your remote filesystem. As I say, I don’t experience this behaviour in the many times I’ve used it, but beware of this possibility before your friends start asking you why you’ve just littered every directory with a .DS_Store file. :P
  • File sizes are not reported correctly by sshfs. Do not believe what it says.
  • If you run SSH on a non-standard port for anti-cracker reasons (very good idea, by the way), the GUI client to connect won’t work. However, you can use the command line client to initiate the connection. From there on, it works just as advertised.
  • All of this is pre-release software. Worked for me, but YMMV.

It’s awesome, though. :D

Backing up your Mac’s /Users folder

Just finishing off my first ever backup of my MacBook. I’ve made a complete copy of the /Users folder, which should back up all the files and preferences of all the users on the computer.

Just for reference, and to show how I’m doing it, I’ll walk you through how I’m doing my backup.

I’m backing up to an external 200 GB hard drive, onto a partition formatted with NTFS. Thanks to MacFUSE and the NTFS 3G projects, I can safely write to the drive easily. I’m not going to cover how to install them here, so I’ll just assume you’re using some kind of external storage already set up for writing use on your Mac.

Now, we could just copy the files onto the storage medium in the Finder, but unless your removable disk is formatted with OS X’s native file system, you’ll lose Mac-specific metadata. While that’s not usually vital, it’s always better to preserve the original information and for that reason we’re going to make a disk image file (yes, like those .dmg files you download) in which to store our backups. Storing the files inside the DMG makes a mini filesystem-in-a-file which is formatted with HFS+ (the native format), so we keep all that extra information.

» Read the rest of this post…

Taking Ajax further with PHP

Peter's WebDev Workshop

First of all, I have to apologise. It’s been literally two months since my last post in this series, and it’s been more than that since I last looked at Ajax in PHP. OK, I might admit it, it was this comment that motivated me to pick up this series again. Oh, that and I’m now on the half term break, so I’m finally getting round to some things that have been on the back burner for a long time.

In our last Ajax tutorial, we got started with Ajax using PHP and made our first Ajax application.

Today, we’re going to take Ajax a little further, by building a little application where our user selects a product from a pop-up list, and then we do a little Ajax dance to get some product details (and an image) and display them in a box below. We’ll be making our own little XML schema which we’ll use to pass information between the JavaScript in the user’s browser and our PHP script on the server.

» Read the rest of this post…

OOP in PHP - Part 1

Peter's WebDev Workshop

Apologies. It’s been literally months since I did my last tutorial here. Most of my tutorial effort has been focused on FOSSwire. Anyway, I’m back now and thanks to a request from Nick I’m starting a new multi-part tutorial today.

Now this has been covered in many places before and the subject is object-oriented programming (OOP) in PHP. For the purposes of this tutorial, I’m using PHP 5.1.6 on Linux, but all of this should work on PHP 5.x on any platform and most of it will work in PHP 4.x.

» Read the rest of this post…

Hacking Firefox 1.5 extensions for 2.0

One of the bad things about upgrading to a new Firefox major version is that inevitably, some of your favourite extensions won’t be modified to work with the new version. And with Firefox extensions being so awesome (and arguably crucial to Firefox’s success)…

But, thankfully, it’s not too difficult to hack the extension files to make your extensions work with the new version.

Before I begin - this process could make your extension (and maybe your Firefox profile too) not work - so do it at your own risk! Having said that, starting Firefox in Safe Mode and uninstalling the culprit extension usually fixes any extension issues that may arise.

I’ll be using BoxCheck for this tutorial.

» Read the rest of this post…

Recording screen demos with pyvnc2swf on Windows

I did it for (Ubuntu) Linux and now it’s the turn of Windows to get some screen recording love with pyvnc2swf. The installation procedure on Windows is also fairly simple, but unfortunately because Windows doesn’t ship with Python (unlike well, say, Linux and Mac OS X and most other Unix systems) we have to install that first.

So without any further ado, we’ll get going.

» Read the rest of this post…

Installing WPGet - video tutorial

You didn’t ask for it… but you got it anyway.

If you’ve been wondering exactly how to install WPGet, you need wonder no more, as I’ve done a screencast with a quick demo installation of WordPress.

This should serve any installation queries until the next version of the Config Tool arrives, which will feature one-click configuration (you will be able to download the fully ready-to-go script without any copying and pasting).

So, get watching!

A few notes:

  • The reason the download in the video took so long is because for some reason the DNS servers over here are being really slow this evening, meaning it takes almost 15 seconds to visit most web pages (every time it does a lookup). Grrrrr…
  • Needless to say, the database password (and relevant details) you may or may not have seen in the demo don’t work anymore. :P
  • Fellow KDE users may ask why I was copying things around and not working off the server directly (I love that feature in KDE). The reason is, most people won’t have that ability or won’t be used to that way of working, so I copied and pasted my way around instead.