Archive for January, 2012

Serve .torrent files from IIS7

By default IIS7 will not serve files with unknown MIME types, one of these could be the .torrent file type, which simply returns a 404 error.

From a command prompt, run %windir%\system32\inetsrv\appcmd set config /section:staticContent /+”[fileExtension=’.torrent’,mimeType=’application/x-bittorrent’]”

Then IISReset

(I’m not 100% sure if IISReset is required, but it worked for me).

Categories: Uncategorized

How to cancel any outstanding javascript on a page

If you have a webpage, and you need to stop all javascript routines from running. That is, any routine started by setTimeout, and executing in a separate thread. Even if you do not have a reference to the value returned by setTimeout, then you can just clear all timeouts as follows;

var maxTimeout = setTimeout(‘null’,1);

Categories: Uncategorized

(PlayBook) Code signing request failed because this file has been previously signed

If you’re working on developing for BlackBerry PlayBook TabletOS, using webworks, you’ll find the usual fun & games when trying to sign the BAR file.

Here’s a few “Gotcha’s” that I got this morning:

[INFO] Parsing command line options
[INFO] Parsing
[INFO] Validating WebWorks archive
[INFO] Parsing config.xml
[INFO] Populating application source
[INFO] Compiling WebWorks application
[INFO] Packaging the bar file
[INFO] Bar packaging complete
[INFO] Starting signing tool
Error: Code signing request failed because this file has been previously signed.

[ERROR] Signing failed

The solution to this error is to increment the buildId, as follows:

C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp>

bbwp c:\bbwp\build\ -g -gcsk pwd -gp12 pwd2 -o c:\bbwp\build -buildId 2

Another nice error was this:

[INFO] Parsing command line options

[ERROR] Cannot sign application – failed to find signing keys

This basically meant that your p12 file needs to be in this folder

C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp\bin

and named “sigtool.p12



Categories: Uncategorized

Basic HTTP Authentication over XMLHttpRequest (AJAX)

Here is a simple way to perform basic HTTP Authentication with a XMLHttpRequest – Ajax request – from your webpage.

       var url = '';
	xml = new XMLHttpRequest();"GET", url, false, "username", "password");
	xml.onreadystatechange = function() {
	   if (xml.readyState != 4)  { return; }
	   if (xml.status != 200)  {

You don’t have to do the Base64 encoding yourself, unlike some examples online. – Do note that “url” needs to be on the same domain as your script.

Categories: Uncategorized

Install a COD file on a Blackberry

Often, if a blackberry app fails to install correctly via Blackberry AppWorld, then you can contact the app developer and ask them for the COD file for a manual installation. If you use the Blackberry Desktop software, it isn’t difficult to install it manually. But here’s a video showing the procedure:

Categories: Top, Uncategorized

Make iPhone App available for iPad

Ok, If you have an iPhone App, and want it to be available for iPad also, then selecti Edit Project Settings from the Project menu and then navigate to the Build tab.

Once there, search for “Targeted” in the search box, and change the value from iPhone to iPhone/iPad.


Categories: Uncategorized

Porting a Palm Pre WebOs App to Touchpad

Without making any changes to a Palm Pre WebOs app, if you try to run it in a Hp Touchpad, then it appears like a little mobile phone in the middle of the screen, not making full use of the screen size available.

Easy fix is to add “uiRevision” : “2” to the appinfo.json file, thus making full use of the screen size.

And, it appears full screen as follows:

Categories: Uncategorized

Transfer contacts from Palm to Blackberry

There does appear to be a number of ways to transfer contacts from Palm pre to Blackberry, most involving Outlook. But this way does not use outlook.


First press phone icon and type #*66623#, and then wait as a VCF file is created (PMMigration.vcf).

Connect the USB cable, and upload the VCF file to Google Contacts ( Then go to your blackberry, and download Google Sync from ( With this app, you can select either a manual or automatic sync.

Et viola!

Categories: Uncategorized

2011 in review

The stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Syndey Opera House holds 2,700 people. This blog was viewed about 36,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 13 sold-out performances for that many people to see it.

Click here to see the complete report.

Categories: Uncategorized
%d bloggers like this: