Monday, 28 March 2011

How to find your public IP address?

Lifehacker recently posted an article about a web site that can help you find your public ip address in a very simple way.

Following is the link:

Friday, 25 March 2011

Online JSON Validator and Formatter

I found a free online JSON validator and formatter that can be useful for people working with JSON.

Following is the link:

Wednesday, 23 March 2011

Turn Off Your Monitor/LCD with One Click - Works For Both Laptops and Desktops

I found a useful utility that can turn off your monitor/LCD with just one click/double-click. Its just one file that needs no installation so its easier to keep it on your desktop.

Works for both Laptops and Desktops.

Here is the link:

Tuesday, 22 March 2011

Firefox 4 Released - Browser Speed Tests Comparison

Firefox 4 was finally released for general use yesterday after much delay. I have been using the beta version and release candidates for quite a while and the biggest change for me was the UI. They have shifted to a minimal design like Chrome and Internet Explorer 9.

Firefox 4 has already been downloaded 4.5M times and counting. According to Computer World, it had already been downloaded over a million times in 3 hours!

Recently Chrome 10 and Internet Explorer 9 had also been released. Lifehacker as a nice article out comparing these different browsers so browser enthusiasts do check it out.

Wednesday, 16 March 2011

And When Mr. Raymond Davis was freed...

I work in a software house named Techlogix that is located on 39-Empress Road in Imran House. The building is directly opposite to the building of American Consulate. Since the day Raymond Davis was arrested, security has been very tight around here as many protests have been held there. Things become really uncertain on Fridays as usually "maulvis" hold a large protest before and after the Friday prayers. So naturally when Raymond Davis was freed yesterday many protesters gathered outside the American Consulate building. Also as the Lahore Press Club building is nearby at Shimla Hill, protests are usually held there very often.

Things got ugly outside. One of my friends Bilal Munir Mughal who works in TRG that is also located in the same building Imran House on the 39-Empress road tweeted this last night:

"Full lathi charge at American consulate.. just survived a danda :s"

I myself was trapped there since 9:45 PM along with many others. Firstly they allowed the people on foot to leave followed by motor-cyclists and then they let only 4 cars leave at that point. Luckily my car was parked in a position that allowed me to be the second one to leave.

There were around a dozen rangers armed with guns and tear-gas. Also there were around 50+ policemen armed with lathis and full riot/crowd control gear.

After I left, people reported that another protest started and some of them were trapped there since 12.

I hope everyone reached there homes safely and urge all others to be safe and careful.

Sunday, 13 March 2011

The Fear of Change

There are a lot of things wrong with this country that we all know but what I think is that one of the fundamental things that is wrong is the fear of change.

Its human nature to become comfortable with what they have been doing for a long time. Majority of us don't like a change in our surroundings that will cause uncertainty for us. We want to maintain status quo. After we spend a lot of time in the same environment, we become familiar with almost all scenarios that can come up in that environment so naturally when we foresee a change happening in that environment, we try to resist it.

I think that this fear of change (whether we want to call it fear or not is another debate) causes us to not finish whatever task that we are doing at a certain point in time. This can be witnessed in many walks of live e.g. I think mostly government employees in the departments that provide services/utilities to general public take too long to adapt to a major change in system like shifting to a computerized system because they are unsure about the next thing they would be asked to do. After spending years with the old system, they are familiar with all the scenarios that can come up in the existing environment and they know very well how to deal with it. Shifting to a computerized system means that the learning curve will go from a flat one to a very steep one. Also they somehow think that after shifting to computerized systems, some of them might be rendered useless for their companies and this would cause them to be laid off in the future.

There is also not much focus on getting things done and this is also related to the fear of change that I talked about earlier.

What I think is that we need to promote the culture of just getting things done and moving on to other things so that we can eliminate status quo and get on with better and bigger things in our lives as a nation.

Saturday, 12 March 2011

The Day I Became A Liverpool Fan

Back in 2005, I wasn't much of a Football fan. I just occasionally watched a few games here and there and played FIFA 2005 a lot but it mostly ended there. I knew a bit about the teams specially Liverpool as I always selected it as my team whenever I was playing FIFA 2005.

So I came to know about the 2005 UEFA Champions League Final and that it was going to be held in Istanbul and Liverpool was going to face AC Milan in the final. A few my friends who followed football regularly were very excited about it so I decided to watch it.

The match started in a devastating manner for any Liverpool fan as AC Milan took the lead early in the first half and by the end of it they were 2-0 up. To make things worse, AC Milan were up 3-0 during the early stages of the second half. It surely felt like game over for Liverpool...

But, the Liverpool fans thought the game wasn't over yet. They continued to cheer on their team regardless of the dire states that they were in. So shortly after Steven Gerrard who was the and still is the captain of Liverpool pulled one back through a header. The score was 3-1. But there seemed to be a change in momentum happening. After scoring the goal, he signaled the crowd and his players to pull themselves up together showing that the game wasn't over for them yet.

Shortly after, they were 3-2. They were about to go 3-3 when Steven Gerrard was fouled in the penalty area and they were awarded a penalty. They was silence in the arena as Xabi Alonso stepped up to take the penalty kick. The first attempt was blocked but he pulled one in on the rebound. The seemingly impossible had just happened... Liverpool fans were on their feet all around the world. I remember that I was the only one awake in the house as no one took much interest in soccer and it was really getting late at night. My eyes were closing but I was forcing myself to continue watching as what I was seeing was something special.

The score stayed 3-3 in the full time. During the extra time Andriy Shevchenko of AC Milan nearly pulled one in but Dudek who was the goal keeper of Liverpool made a miraculous save to take the match to penalties. That proved to be the turning point of the match. In the last penalty, Dudek saved the penalty kick of Andriy Shevchenko to make Liverpool the 2005 UEFA Champions League Winners...

That was surely one the most outstanding football matches I have ever seen.

I stumbled upon a video of the match a few days ago that prompted me to write this post. Please find it below:

Tuesday, 8 March 2011

How to Use SVNKit Library?

Firsly, add the following dependency in your pom.xml file for those of you who are using maven:








Now lets take a look at the code for checking out an SVN repository:

private void checkOutFileFromSVN(String svnLocation, String localDestination, String username, String password)
throws SVNException {

// URL of the SVN respository
SVNURL svnURL = SVNURL.parseURIEncoded(svnLocation);

// Getting an instance of SVNUpdateClient and passing it the username and password for accessing the SVN repository
SVNUpdateClient uc = new SVNUpdateClient(
password), SVNWCUtil.createDefaultOptions(true));


/* This command will checkout the files from SVN respository located at the svnURL into the local destination specified by the localDestination parameter*/
uc.doCheckout(svnURL, new File(localDestination), SVNRevision.UNDEFINED, SVNRevision.HEAD, SVNDepth.INFINITY, true);

I hope someone will find it useful :)