I was riding home last night (~8.00pm) and was coming down Hunter St Sydney CBD (to get back to The Rocks) when somebody on my side of the road hailed a cab. There was a cab going in the opposite direction who was obviously hungry for a fare. He simply slammed on the brakes and did a U-Turn right in front of my bike! I was on a downhill section of Hunter St and performed an E-Stop (to the best of my ability) with the bike squirreling and swaying underneath me with the rear locked. I do remember thinking, "this is it; we're going down Blaise" but all those years of motorcross/supercross must have amounted to something... I steered between the cab and a parked car and came to a halt - upright. I also recollect a few pedestrians commenting regarding both the cab and the fact I remained right-side-up. By the time I gathered my thoughts and composure, the gent who hailed the cab was in the back and the cab was gone. Took about 10 minutes for the pulse rate to return to normal levels and I was simply angry that a cab would perform such a stunt a) right in front of me; b) across double yellow lines; & c) in such a busy area of the city. Now I know I titled this "" what do I do if this happens" but I wonder if there is anything that could have been done differently. It seemed that no sooner had the person raised their hand for the cab and he was doing the "Starsky & Hutch" to get to him leaving no time to react on my part. Luckily I wasn't going at much of a pace (pedestrians cause enough grief around Wynard anyway). Still, having the bike nearly sideways going downhill towards a semi-parked cab isn't my idea of fun!