July 27, 2011
Display Twitter Feed on Polycom
Well I got this new IP Phone replacing our old PSTN phones. But the LCD screen on the phone looked bit boring.
There were few ideas how I can use this realestate to do something interseting.
Display the train timetable(Metlink doesn’t give you a clean API to scrape the time tables, and I don’t have time to write a script scrape the data from its bulky website. )Weather(Kind of boring to watch it all the time)- What’s people talking about your company on Twitter, and thats what I did…..
My Ugly Bash Script
#!/bin/bash
text=`export http_proxy=http://xx.xx.xx.xx && /usr/local/extractSearch.pl`
convert -size 160x75 -monochrome -depth 1 -type Bilevel -gravity center caption:"Twitter Feed\n$text" /var/www/polycom/image.bmp
The Perl Script
#!/usr/bin/perl
# use module
use XML::Simple;
use LWP::UserAgent;
use Data::Dumper;
# create object
$xml = new XML::Simple;
my $url = "http://search.twitter.com/search.atom?q=<Your Query>&rpp=1&page=1&locale=en";
my $ua = LWP::UserAgent->new();
$ua->env_proxy;
$ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)');
$ua->timeout(30);
$ua->default_header('pragma' => "no-cache", 'max-age' => '0');
my $res = $ua->get($url);
$data = $xml->XMLin($res->content);
print "$data->{entry}->{title}"
January 29, 2011
Am I hacked?
I found a very strange thing when I saw DNS queries for random servers on Wireshark. I am running Ubuntu 10.10 and I was pretty sure that no one is running malicious scripts on my Laptop. I was really worried when I saw DNS queries to www.ssa.gov and I had no idea what it was at the time. And when I googled to find out what it was the DNS queries increased.
So I had to get the bottom of this. “lsof” is a very useful program to see which process is responsible for the which network transaction. When I ran the following I found the culprit.
poo@SDT-TravelMate-8572G:~$ lsof -i udp
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
firefox-b 1855 poo 42u IPv4 27548 0t0 UDP SDT-TravelMate-8572G:41473->dns1.xxx.com.au:domain
firefox-b 1855 poo 62u IPv4 27547 0t0 UDP SDT-TravelMate-8572G:35432->dns1.xxx.com.au:domain
firefox-b 1855 poo 63u IPv4 27556 0t0 UDP SDT-TravelMate-8572G:34421->dns1.xxx.com.au:domain
So the culprit is Firefox doing DNS pre-fetching. Interesting article on that
December 10, 2009
On a conference bridge at 4am
Damn it is a long conference call tonight, five people on the bridge and trying to figure out what to do with a faliure.
Not going to work tommorow.
Saving is the new spending

Photo by torugatoru
Since we moved to Australia, we were thinking whether to ride the mortgage bandwagon or not. But we are struggling to find the right house for the right price. These are our requirements.
1) Within 25 I’m radius of the city.
2) 3 bedroom
3) Just enough garden
4) South eastern suburbs.
But after months of looking around we still haven’t found the house that will take our breath away. So we have to compromise at least one of the requirements. We have seen some nice houses in the northern and western suburbs. But right now it’s not an option for us with N’s work. And one more special reason. Anyway our savings are getting bigger which effectively will increase our buying power.
Anyway this is an advice for all those people who are renting. Rent money is dead money as well as the interest payments of the mortgage. If you are not in a position to buy make sure that you increase your savings. This will increase your buying power as well as your deposit.
Saving is the new spending.
December 9, 2009
iLo through SSH tunnel

Photo by the_Linux_Cauldron
This is for geeks and for my future reference.
I am quite used to tunneling port on hosts in remote networks. I thought iLo is using only http and http for it’s management. But if you need to to access the intergrated remote console with virtual media you need lot more ports than that. These are the ports you need to forward.
22 Secure Shell (SSH)
23 Remote Console / telnet
80 Web Server Non-SSL (HTTP)
443 Web Server SSL (HTTPS)
3389 Terminal Services
17988 Virtual Media
9300 Shared Remote Console
17990 Console Replay
3002 Raw Serial Data
Thanks to Karlo
Driving to the city
![]()
Photo by Age![]()
Since I needed to grab some servers from a data center to my office, I had to drive to city yesterday. This was the first time I drove to the city. I was in a dilema whether to take the toll or not. Citylink in Melbourne will cost you $12 for a day pass. It will take you from M1 directly to Exhibition street if you take the Batman Avenue exit. Since my friend was worried that he will be late to work we thought of taking the citylink option an expensive one but it took me directly to the exhibition street without a hassle.
Picking the servers became quite a heavy task. I thought I can use a trolly but it was not the case. I had to lift the servers from the 2nd floor to the street twice. Well now I pay the price for it. My arms and shoulders hurt like hell now. I am quite used to lift heavy things. Few years back I used to unload 20ft containers in four hours, I quite enjoyed doing that. But now my body has been quite lazy.
Our office building has it’s own carpark, it is very convenient . And if you park the car before 10am you will only have to pay $11 for the whole day.
Driving back home was a different story. I had to wait 20 minutes in the exhibition street. But it was ok and enjoyable. I was able to do some siteseeing without leaving the comfort of my car. No complaints after I entered the M1. It took me directly to South Eastern suburbs in 15 min.
Ok now the comparison.
| Cost | Car | Train |
| Fuel (70km) | $8.5 | $0 |
| Toll | $12.50 | $0 |
| Parking | $11 | $0 |
| Ticket | $0 | $9.86 |
| Total | $32 | $9.86 |
As you see it was a quite expensive drive.
December 7, 2009
The Fuel Economy
Eversince we got our new Holden Viva, I had big hopes about the four cylinder having good fuel economy. But it never performed the according to the Holden specifications. Fuel economy was one of the main reasons we went for a mid sized car, but I am dissapointed.
Average 7.4 litres/100km was promised on the Daewoo Lacetti with Holden fur. But for the last one year I never achived that. The best I got was 9.9 liters/100km. So I was thinking, I should change my driving habits to see whether I can hit the 7.4 mark. According to the couple who drove from Melbourne to Canberra on less than half a tank, hypermiling is the way to increase the fuel economy.
So for the next few weeks I will be following these guidelines.
BE A HYPERMILER
- Avoid brake usage, or sharp acceleration whenever safely possible.
- Drive at or slightly under the speed limit.
- Switch off your air-conditioning.
- Plan your journey and avoid rush hour when possible.
- Avoid carrying unnecessary weight, such as roof racks, tool kits or golf clubs.
- Don’t leave the engine idling.
- Keep your tyres at the right pressure.
- Tune and service the engine.
- Use higher manual gears.
Keep an eye on the chart on the main page.
Metro vs Connex

Photo by zed.fitzhume
Here I am at the station waiting for another train. Since the new operator has taken the responsibility of running Melbourne metropolitan train system, there has been this big argument who is better. Metro or Connex.
Connex was managing the metro train lines for the past ten years. State government took the decision to get rid of the old operator and get a new one from Hong Kong. Which is said to be ultra effecient in running of HK metro.
Personally I didn’t see major issues with Connex. I might have low expectation because Melbourne Metro System is thousand times better than the Sri Lankan one. Travelling in Sri Lankan public transport system is health and safety issue. To those who are unfamilier with Sri Lankan transport system, it like the Bathurst V8 with cars replaced with aluminum bodied buses. Drivers of these buses compete with each other in the same route to pick up more passengers. So you will never know when you will end up in major crash. Coming back to Connex everybody thought changing the operator shall revolutionize the train system and will make it look like HK metro. But reality is far from it, state government has failed to identify the needs of these passengers, what we need is not change of logo or metro in front of every announcment. What we need is more trains in peak hours and reduce the time people have to wait for a train in non peak hours.
To make this a reallity what we need is more trains, more drivers, more tracks and effecient signalling system. New operator cannot provide this without the backing of the government.
Time to get off in Melbourne Central.
Blogging from iTouch

Photo by Kai
Found an interesting app for offline blogging on wordpress. No brainer look for wordpress in iTunes. I might use my iTouch to blog rather than a netbook.
