Archive for the ‘Tricks’ Category

Posted on 20 May 2008 at 23:27 UTC, filed under Tricks, 16 comments.

Here’s something from my mailbox – someone wanted to know how he could crawl his site and confirm that all of his pages really have the Google Analytics tracking-code on them. WordPress users have it easy, there are plugins that handle it automatically. Sometimes it’s worth asking nicely :) – let me show you how I did it. As a bonus, I’ll also show how you can check the AdSense ID on your pages, if you’re worried that you copy/pasted it incorrectly.

This is pretty much cross-platform, but as a Windows-user you’ll have to grab and install two files first:

  • wget – a tool to download copies of web pages
  • UnxTools – a collection of popular Unix/Linux tools for the hacker in you

Extract the ZIP files, copy the contents somewhere where you can find it and make sure that the appropriate folders are in your “path” (the files you’ll need for UnxTools are in “…\usr\local\wbin”). We’ll need to access these tools through the command line. I have a feeling I may need to elaborate on that for Windows users :) — let me know if that’s the case.

First, we’ll mirror our site on our local machine (this assumes that your site is crawlable; if it isn’t, then fix it first :D ):
Continue reading ‘Confirm that you’re using Analytics on all pages’ »

Posted on 1 February 2008 at 23:14 UTC, filed under Tricks, 13 comments.

Sometimes it would just be great to have multiple instances of Firefox running at the same time. Some web applications just love to eat memory in Firefox, some web pages go crazy if you have JavaScript enabled and sometimes you just want different sets of cookies to let you manage two accounts at the same time.

I’ve been trying to do that for years and did the most exotic things to make it happen. I’ve used four different browsers in parallel and I’ve even used a virtual PC running within my PC (that kind of defeats the desire to use less memory, but it feels neat anyway). In the end, a collegue in the office, who happens to use emacs as his main web browser :D , pointed me into the right direction.

Now I have three completely independant instances of Firefox running at the same time!

3 little Firefoxen, running on a desktop

So what’s the trick?
Continue reading ‘Running Firefox in parallel’ »

Posted on 12 January 2008 at 16:05 UTC, filed under Tricks, 15 comments.

All of the websites I put together at the moment are used for playing around and testing things. It’s fun to set up a site, try some things out, delete it or just let it sit and then – usually much later – start over and try something else. The only problem is that by the time I am ready to start over, I have forgotten my password. I can find my user name, it’s in the FTP client and visible in my hosting control panel, but the password is not visible anywhere. The secure way would be to just pick a new password, but let’s assume you need your old one :-) . The following will also work for email passwords stored in your email client, by the way.

What we’ll do is “sniff” the connection that your FTP client builds up, we’ll take a look at the packets sent out and received. Remember that other people can do this as well – say if you’re on an insecure wireless connection on the road — use secure connections and protocols whenever you can!
Continue reading ‘Go hack yourself – recovering your FTP password’ »

Posted on 29 November 2007 at 0:34 UTC, filed under Tricks, 20 comments.

Google’s webmaster tools has a neat feature that lets you download your query and click statistics (once you have verified ownership of your site). The data you can get from there is quite comprehensive, but hard to break down for use in Excel. As a fun exercise I put together a small Python-script that takes the CSV file downloaded from your webmaster tools account and turns it into new CSV files for queries and for clicks (both with the position numbers as well).

Python is a neat little programming language, I like it more and more as I use it :) .
Continue reading ‘How to use Google webmaster tools stats with Excel’ »

Posted on 30 August 2007 at 22:51 UTC, filed under Tricks, 12 comments.

If you have to do things over and over again, it’s a good idea to use a tool to make things easier. Windows is a bit limited (or very – when compared to Linux) when it comes to batch file scripts and “wget” is limited to what it can do right out the box, so I sat down and wrote a few command line tools to help me with some of the website checks that I like to do.

The tools I included in this set can do the following:

  • Check the result codes for a URL (and follow in the case of a redirect) – or for a list of URLs
  • Create a list of the links found on a URL (or just particular ones)
  • Create a list of the links and anchor texts found on a URL (or just particular ones)
  • Create a simple keyword analysis of the indexable content on a URL

Continue reading ‘A set of command-line Windows website tools’ »