My first power wheelies

This morning I had a couple of moments free so I headed to a place where everyone practices their shit on motorcycles...I wanted to try out doing power wheelies and after a couple of attempts I managed to take off the front wheel by a couple of feet :)

I took the leisure to record myself on iPhone and edit the result with iMovie (finding a good excuse to familiarise myself better with this software). I hope you enjoy the video:

Continental Conti Attack 2

Just ordered these beauties yesterday for my ZXR 750 Streetfighter project. Looking forward to (ab)use them :)

Gordon's Mods for XR400R

The following is a list of must-have mods on your stock XR400R. It is considered by many an authority, a bible, you know - a de facto standard, after a certain dude called Gordon Banks did a number of experiments on his XR400R with specific detail to the air/fuel flow (carb, air filter and exhaust) and documented all the volumetric specs. This is a culmination of these documented experiments, last updated November 25, 2000.

Stock Carb Specs
My 2000 XR400R came with a 142 main jet, 52 slow/pilot jet, and the needle clip in the 3rd position. Right off the showroom floor, mine ran fine, but definitely on the rich side. Removing the airbox snorkel without re-jetting, however, made it run lean and overheat.

Relieving Muffler Baffle
This is a very simple procedure, and one that can be almost as easily reversed. Best of all, though... it works. After carefully examining the stock baffle/spark arrestor, and running some flow numbers for the different areas involved with the numerous plates and baffles (both in the muffler and on the baffle insert), I've come to the conclusion that the primary restriction to exhaust flow is the small final outlet, which has an I.D. (inner diameter) of only 20mm. Without removing the baffle insert from the muffler, examine the exhaust tip. Notice the actual outlet, which measures 20mm I.D. (approx. 0.787"). Around this is a larger 'bright finish' ring which appears to have no real function, but may be to help prevent the rider from coming into contact with the actual outlet, which probably runs hotter. Down in between the 20mm outlet and the bright-finish outer ring, there is room to drill 1/4" holes into the baffle to provide additional exhaust flow area. Holes drilled in this area will be 'inside' the spark arrestor screen, by the way, so the spark arrestor function is maintained.

On my baffle insert, the area to be drilled is large enough to accept a 1/4" drill, but there's a benefit to using a #2 drill bit (0.21") (or maybe a 7/32" bit) which I'll explain a little later on.

Since the stock 20mm (0.787") outlet provides a flow area of only 0.4862 sq. in., and a 0.21" hole has a flow area of 0.0346 sq. in., each 0.21' hole adds 7.1% more flow area. Just three such holes will increase the exhaust flow area by over 21%, and four will increase it by over 28%.

First I ran the engine with the un-drilled baffle, to get an up-close feel for the sound level at idle, and while revving the engine. After drilling one hole, I could barely hear any difference. After drilling a second hole, I could hear the difference, but it was slight. The third hole made a bigger difference, but still not objectionably loud. The fourth hole made it just a little louder than I was willing to accept, adding a definite bark to the exhaust note. Since I had use a #2 drill bit, which is approx 0.21" in diameter (it's supposed to be 0.221"), I was able to plug the 4th hole very simply by screwing in a 1/4x28 set screw, which I wouldn't be able to do had I drilled the holes with a 1/4" bit. This effectively reverted back to having just three holes, and it also indicates that I can plug them all with 1/4x28 set screws, to return to the stock sound level if necessary. Come to think of it, I guess you could say that this modification is "tunable" by inserting or removing set-screws from numerous holes.

A brief test ride with stock jetting showed that the added three holes gave the bike a cleaner and stronger throttle response, probably because it runs rich when totally stock. It was now running cleaner, so the added 21.3% flow area was beneficial, and it had cost me nothing but a little time. It's also totally reversible by plugging the holes with set-screws.

It is NOT necessary to remove the insert when drilling each hole. The metal chips will fall either outside the muffler, or into the screened area of the spark arrestor. Once you have drilled the desired number of holes, you can then remove the insert and shake out the tiny pieces if you so desire. If you don't, they will eventually fly out the exhaust outlet anyway, since the spark arrestor screen prevents them from falling down inside the main muffler.

Spark Arrestor/Muffler Note: The 1996/97 XR400R has a two-piece exhaust pipe insert. The removable spark arrestor has a removable muffler insert. With the muffler insert in place, the exhaust is very quiet and very restricted. With the muffler insert removed, the spark arrestor alone has an open outlet nearly 1.5" in diameter, so it makes really good power, but is also pretty loud. The 1998/01 spark arrestor insert has the small 0.787" outlet which serves as the combined spark arrestor and muffler, all in one piece. It has more restriction than the 1996/97 spark arrestor alone, but more restriction than the 1996/97 spark arrestor with the muffler insert. Both of the two different spark arrestors fit all years of the XR400R's exhaust pipe (three small bolts).

Grinding Header Inlet Welds
Grinding Header Inlet WeldsI'd read about the header inlets being partially shut off by the welding that builds up when welding the 1" I.D. header pipes to the clamping flanges, so I examined mine. Simply loosen the clamp bolt where the header pipes assembly slides into the muffler, and then loosen and remove the four nuts (two per pipe) where the headers are clamped to the head. The muffler bolt and all four clamp nuts accept a 12mm socket. Then the header pipes assembly slides forward and into your hands.

On mine, a 2000 model, the built-up welded area in each pipe was terrible! The remaining opening measured a rough 0.75", leaving a flow area of only 0.44 sq. in. A 1" i.d. pipe has a flow area of 0.78 sq. in, so the welding left only 58% of that! I started grinding down the built-up welds using small grinding stones in my Dremel Moto Tool, but that was too slow. I went to the hardware store and bought some inexpensive coarse grinding stones to fit my 3/8" drill, and one 1" ball stone for finishing. I spent over two hours grinding away. As a "size guide", I chose an 18mm socket that has an outer diameter of 0.944" (different brands will vary in size, of course). Once the 18mm socket would slide into the header pipe, I quit, not wanting to remove too much of the weld, and weaken the joint. I then used the 1" ball grinding stone to finish up. Since the stone itself wears away faster than the weld material, I ground a little on each pipe, going back and forth between the two, until enough of the stone wore away to fit into the opening. This final touch didn't really make either opening larger, but it did make them both about the same size and shape.

Since I started with a 0.75" opening, which had a flow area of only 0.44 sq. in., and finished with a 0.944" opening, which has a flow area of 0.670 sq. in., I achieved a gain of more than 52.5%.

In one afternoon I significantly improved the flow characteristics of the stock exhaust system, and my total investment was under $10 (for some cheap grinding stones and one 1/4x28 set screw). I already had the 3/8" electric drill and #2 drill bit.

Air Intake System
Snorkel RemovalI removed the air box snorkel, and then used a scrap of aluminum window screen to cover the opening to keep out trash and clumps of mud. I then removed the stock air filter and support, the latter of which includes the backfire screen. Noting that the backfire screen consists of two layers of screen, between which are trapped two more layers (actually a flattened screen 'tube'), I carefully cut away only the outer layer of screen, and removed the trapped inner piece, leaving only one, the inner layer, of the original four-layers of screen. I happen to like foam air filters, so I'm sticking with the stock filter for now. (I later bought a TwinAir filter, but with the backfire screen modified, I see no performance difference between the TwinAir and the stock air filter. If I were using a louder and more free-flowing exhaust, perhaps the TwinAir or Uni filter would make a difference.)

NOTE: Cutting the metal screen is a chore, and it's difficult to get rid of every tiny little piece of wire (from the screen) you cut, so I no longer recommend cutting the stock backfire screen. Instead, buy a Uni Filter air filter for the XR400R. It comes with a screen-less air filter support, and a less restrictive air filter.
Despite what I read elsewhere, it is NOT necessary to move or remove the subframe to remove the carburetor! After removing the seat and gas tank, I simply loosened the two clamps holding the carb to the airbox duct and intake manifold, then loosened and removed the three bolts holding the intake manifold to the head. By turning the intake manifold a little CCW first, the carb and intake manifold then slide easily out the left side. After removing the carb from the intake manifold, I examined the composite rubber & plastic intake manifold. I do not think it was necessary, nor do I think I gained anything from it, but I used my Dremel Moto-tool with a medium size sanding drum to clean up the few ridges found inside. Just couldn't resist!

Jetting Changes Required
After two days of trial and error jetting (and a few hours more since then), I came to find that the exact same jetting recommended by Cycle News (several years ago) worked best. I'm using a 160 main jet, a #60 pilot jet, and the triple-tapered carb needle that comes standard in the 1998 and later XR400R's, with the needle clip in the stock (3rd groove) position. My altitude is approx 700' above sea level, and I ride regularly up to 3200', where it still seems to work just fine. I've also replaced the 15t drive sprocket with a 14t. For the terrain where I ride, the stock gearing is a bit too high. Depending on your particular machine, you might prefer a 158 main jet is using a stock or modified stock exhaust. If using a louder and more free flowing exhaust pipe, or the 1996-97 spark arrestor without the muffler insert, you'll want to use either a 160 or 162 main jet.

How my XR400R might compare to a differently modified version, I don't know. All I do know is that it easily pulls away from an unmodified 1999 model, and that I am able to pull up the front wheel at will in any of the first 3 gears. It is a little louder than stock, but not as loud as a KLX300 with its muffler tip removed, and it is nowhere near as loud as an XR or WR 400 with the muffler insert removed altogether. It's more than I need for woods riding, but without being 'difficult' to ride.

Credits: Reprinted from Mike Williams' personal Website with permission from Gordon Banks and edited by

Being a DBA

Zen and the Art of Motorcycle Maintanance

I am sharing this post for those people who either want to work on their own motorcycle themselves or to at least know how the motorcycle internals work before leaving it at a mechanic shop. I have been always the kind of DIY guy, and learn by following these two processes in this order:
  1. Lots of research (books, manuals or internet).
  2. Break, Fix, Learn.
If you are like me, you might find this website (Dan's Online Motorcycle Repair Course) really useful. It has been online since 1999 and is considered an authority in motorcycle mechanics. I recommend you to check it out if you have never been there.

ZXR750 Streetfighter Project Part 2

In Part 1 of this series I talked about the purpose of the project and what has been done so far. In this part I will list all the additional upgrades used in this project.

Bar mounts 

Streetfighter Universal Headlight

Renthal Superbike High Handlebar

Custom made braided Brake and Clutch lines

Integrated Tail Light

In the next part of the article the project will hopefully be ready! Other stuff in the pipeline:
  1. Spray painting the motorcycle except the tank and wheels.
  2. Continental tires.

Parking business card

Someday I am getting myself printed a bunch of these business cards.

Change application icon in OSX

Changing the icon is simply a process of copying and pasting. Go to the application which has the icon you want to copy, right click and choose "Get Info" - now click on the icon at the top left corner:

You will notice that the icon is now highlighted in a light blue color. Press Cmd-C to copy the icon. Repeat the above process but this time on the application you want to change the icon, highlight the icon and press Cmd-V to paste the new icon.

Triggering a Shell Script from Application Dock in OSX

As I have commented in the previous post, sometimes you need to frequently run a set of commands or a shell script from the Terminal application, for example to activate your favorite USB WiFi adapter. There are two options of going around that - either set the script to execute on startup, or to configure the script as an application which you can just trigger with a single mouse click. I will discuss the latter as it makes more sense for ad-hoc shell scripts.

The first thing you need to do is open up the Automator application which is installed by default on OSX:

Automator enables you to configure new applications - in fact once you open up Automator you need to choose the Application template:

Next you need to click on Library and find the "Run AppleScript" workflow:

This will let you configure a new AppleScript where you can put the commands or shell script to run. Note that if your script needs to be run under sudo, you need to use the "with administrator privileges" clause:

Now just save the file (this will be saved as an application) - You can drag this application to your dock which you can execute at any time.

Install Alfa Wifi AWUS036H on OSX

So you are an Apple freak but you do admit that our macbooks have a really weak wifi connectivity. You must have also purchased one of the best USB wifi adapters, the Alfa AWUS036H and find out that it is not compatible with Snow Leopard or later... Worry not, today I have managed to install this Wifi interface and I am really enjoying it's massive signal boost. I will teach you how I did it.

  1. Download the Realtek 8187L from Alfa website or your CD media. Note that the driver must be for OSX 10.5 or later.
  2. Unpack the zip file and install driver by double clicking the install.pkg
  3. At the end of the installation you will encounter an error that the extension is not supported. Kindly ignore the error and proceed to the next step :)
  4. Restart the computer.
  5. Open Terminal and enter the following commands:
    cd /System/Library/Extensions
    sudo chmod -R 755 RTL8187L.kext
    sudo chown -R 0:0 RTL8187L.kext
  6. Restart computer once again.
  7. Plug in the Alfa USB wifi device.
  8. Open Terminal and enter the following commands:
    sudo kextutil -t -v 
  9. A network window shall pop up where you configure a new profile or connect to an existing wifi hotspot. 
  10. You have now configured your Alfa USB wifi adapter!

Note that each time you reboot the computer, you need to repeat step 8.

ZXR750 Streetfighter Project Part 1

I must say I am lucky enough to be the owner of a 1994 ZXR750, deemed to be a future classic superbike. And I am so proud of this bike that I decided to feature it as the banner of my blog. The thing with this motorcycle is that it is a torture machine to ride it for more than 20 minutes in normal streets. This forced me to transform it into a streetfighter....

The ZXR750 in its original form

Removing front fairing

Side fairings removed as well

Stripped of plastics

Triple clamp removed

Drilled triple clamp, re-enforced and painted.

In the next part I will show you the final product...At the moment I am painting remaining plastics and the frame. I am going to replace the front and the rear end of the bike, and mount the new handlebars on the triple clamp.

Transfer images from iPhone or any camera to OSX

This must be one of the most asked questions amongst the Apple community. The easiest and fastest way to transfer pictures from iPhone or any other digital device to OSX is by using the Image Capture application (installed by default).

Select the images or videos you want to transfer and drag them to the destination folder. On the left hand side of the screen you can also configure the default application to start whenever that particular device is connected to OSX.

Connect Perl to MySQL

If you are a MySQL DBA, one of the most useful things you need to know is Perl. This will make you able to create custom tools such as for example benchmarking tools to run against a MySQL database.

It is extremely easy to use Perl with MySQL - but first you need to install the MySQL Perl module:

ivory:~ user$ perl -MCPAN -e 'install Mysql'

This should be pretty straightforward although sometimes it can complain that it cannot find mysql.h - just make sure to create relevant symbolic links to the path it is looking the include files.

Once you have the Perl module installed you can use the following template script to initiate a connection with MySQL - in this example I am only going to show you how to connect to the database and list all the databases. Follow this blog for other uses and examples.


use Mysql;

$host = "localhost";
$database = "test";
$user = "testuser";
$pass = "password";

$connect = Mysql->connect($host, $database, $user, $pass);

@databases = $connect->listdbs;
foreach $database (@databases) {
        print "$database\n";

Install make or gcc on osx

At the moment I am playing around with Perl - however to my dismay I just found out that I cannot compile additional Perl modules on my macbook because I don't have make, gcc and none of the developer tools installed.

After some research I found out that I need to install XCode provided by Apple. Now here's the caveat: latest version of XCode (XCode 4 at the time of this article) is only free with Lion and Mountain Lion (the latest OSX versions). I currently run Snow Leopard and didn't find it fair to pay money to get a simple compiler. More research and I found out that XCode3 is still free for Snow Leopard and earlier releases. This is the link to download XCode3. Sign in with your Apple ID and you're set - you will now be officially registered as an Apple Developer. Woohoo.

This is the file you need to download. Notice that it is around 4GB:

Alternatively if you want to save some time and space, you may want to just download the following kit which is around 700MB:

After installation is complete you should be able to use make, gcc and compile whatever Perl module you want!

XR400 vs Traffic

Took the leisure to try out the new camera setup on my thumper! It vibrates a lot but at least the Kodak V570 tries to compensate the shaky image. Anyways I recorded a piece of urban riding on the XR400 - this is just a tidbit of what I see on an everyday basis - my daily commute to work used to be 12km back and fort. Check out the video and tell me if there is a better option other than zapping the traffic!

Breaking the chain

First off I don't want to make this post sound like I have been enslaved in the corporate world for the past decade! You never know what the future reserves :)

However the time has come for me to break the chains from the corporate working environment and start working independently. It will be a new challenge, working much much more hours, but at the end far more gratifying with less bullshit and a steeper learning curve - the kind of thing which keeps the ones like us ticking.

Find which table has a particular column in Oracle

Sometimes we need to find out which tables contain a particular column. In Oracle this can be simply done by querying the DBA_TAB_COLUMNS system table:

What moustache?

I confess I haven't laughed this hard for quite a while now...

My gastroenteritis experience

As you may have noticed I haven't been blogging for the past few days. The reason is due to gastroenteritis which led me to an intimate experience with the chinese porcelain. This is Day 4 and so far I have been doing poop soup every two hours, drinking water and eating nearly nothing. 

My friends, this is a terrible experience and I have learned these things so it will never happen again to you:
  1. Wash your hands well after touch common areas (doors, sink mixers, bus hangers, etc)
  2. Do not eat from dodgy places (cheap kebabs, mc donald's, etc)
I am anticipating to get a bit better by end of week. 

Flushes the toilet.