Thursday, September 24, 2009

Adding a WunderCounter Link to Your iPhone's Home Screen

Since a number of you are checking your stats with your iPhones, I thought I'd share this handy tip with you. To get a link to the WunderCounter directly from your home screen (with your other applications), do the following:

  1. Open Safari on your iPhone
  2. Go to
  3. Click the "Login" link at the top right of the screen
  4. Wait for the login page to load
  5. Now, click the "+" icon at the bottom of your screen
  6. Select "Add to Home Screen"
This will add a new icon to your iPhone which looks a little bit like the home page of the WunderCounter. You can arrange it just as you would any other icon. Clicking it will take you directly to the WunderCounter login page in your Safari browser. It's a handy little thing that can save you a bit of time here and there. You can, of course, do this with pretty much any web page you'd like to bookmark in Safari. I use it myself and I find it to be quite helpful.

Friday, September 18, 2009

HTML::Restrict - Easily Strip HTML From Your Documents

I've just released HTML::Restrict to the world. It's a Perl module which allows you to strip HTML from text very easily. Here's an example:


use strict;
use warnings;

use HTML::Restrict;

my $hr = HTML::Restrict->new();
# use default rules to start with (strip away all HTML)
my $processed = $hr->process('i am bold');

# $processed now equals: i am bold

If you want to allow some HTML but not all, you can add a set of rules to allow arbitrary elements and attributes:


use strict;
use warnings;

use HTML::Restrict;

my $hr = HTML::Restrict->new();
b => [],
img => [qw( src alt )]

my $html = q[hello me];
my $processed = $hr->process( $html );

# $processed now equals: hello me

This has now been released as Open Source software and is available on the CPAN

Tuesday, September 1, 2009

How I Spent My Summer Vacation

Things have been a little quiet on the blog front lately, but that doesn't mean there hasn't been plenty of work behind the scenes. Just thought I'd fill you in on some things I think are interesting.

More Twitter Integration

I've been working on further integrating the WunderCounter with Twitter. Early, you may recall, I added daily stats summaries via Twitter DM (Direct Message). That got me thinking that the immediacy of Twitter lends itself really well to the Tripwire feature. So, I've just about finished setting this up. I'm tentatively calling it Twitwire. The concept is that you can flag IPs which you are interested in and, on a per-IP basis, you can decide which are important enough that you'd like to get a DM when this IP visits your pages. You could find out within seconds who is visiting your pages without even having logged in to check your stats. I think that's pretty cool and I'm looking forward to unleashing it you in the next few weeks. It just needs a bit more testing and then it will be on its way.

Cleaner Looking Reports

I've been integrating the Bluetrip CSS framework with the login area of the WunderCounter. It will make the reports look cleaner and more consistent. Plus, it's just a really handy tool to have in your toolkit. I recently used it on this calendaring system which I put together for the United Nations Association of the United States It makes it very fast to get started with a clean layout which is (I think) very easy on the eyes.

A Little Bit of jQuery

Any JavaScript work I'm doing now is generally based on jQuery. I was using prototype and a while ago, but jQuery is my favourite JavaScript tool right now. It makes working with JS pleasant (never thought I'd hear myself say that) and it makes simple tasks easy. There's a huge community behind it and almost more plugins than you could wish for. If you haven't had a chance to look at it, I highly recommend it.

New Hardware

I've got a couple of new dedicated servers almost configured and almost ready to go. I'll get those pulling some weight as soon as I can slot the time, but they're also available to be used right away if any other hardware melts down. It's always nice to have a couple of spares.

Getting to Know GitHub

Over the summer, I've taken on some new open source projects and posted them to along with some other work which I've had online for a while. My public GitHub projects can be found at The new projects are:

WWW::Mechanize::Cached This is a Perl module which caches web lookups. It allows you to make your own bots, site scrapers etc which can cache pages, which dramatically speeds things up when you have to re-run your scraper or when you're testing etc. It's a module which I took over from Andy Lester, who was kind enough to give me access to it after I approached him about cleaning up some of the open bug tickets.

Net::FreshBooks::API This is a Perl module which is really just a layer over the XML interface to the FreshBooks API. It means you can do cool stuff with their API without having to mess around with XML. Increasingly, I'm finding that this is a very good thing. I've never been a huge fan of XML. It's often very clunky and, in many cases, total overkill for basic API functionality, but that's likely a topic for a different post entirely. Edmund von der Burg was kind enough to make me a co-maintainer of this module so that I could add functionality for recurring billing. This is for some client work I've been doing. More on that when the site is officially online.

Off the top of my head, that's the important coding-related stuff. Watch for some of these improvements to come online over the month of September. I've already got plans for some new functionality after that, so hopefully there will be lots going on to keep you interested.