Blog about the Net, Pakistan and more

Friday 26th June 2009

Michael Jackson dies at 50

General
Michael Jackson

Heard about the shocking news about an hour back and it's official. Michael Jackson has passed away at the age of 50.

Although I was never a real fan, I remember being asked to write a letter in school to my favorite musician. Only one name came to mind: Michael Jackson. I also remember John, Manish and Anil, some of my friends at the time, doing the same.

Then I remember the King of Pop coming to Singapore on his Dangerous tour and taking the whole island by storm. For months later, we were drinking from cups bearing the Dangerous insignia and being awed by his Black or White video.

Though he gained notoriety for some of his more recent antics, such as dangling his baby son off a balcony, he has definitely left his mark on more than one generation and was one of the world's most recognizable names. Sad to see him go like this. R.I.P.

 

Liked this article? Make it popular:

Posted at 05:53am PKST  Comments(202) |

Monday 22nd June 2009

Pakistan wins the 2009 Cricket World Cup

Pakistan

Firstly, let me just say that despite my great love for participating in most kinds of sports and physical activities, the thought of watching a match from the couch doesn't quite appeal to me (well, maybe with the exception of the FIFA World Cup). And when it comes to Cricket, I have neither the patience, nor the will to sit through a whole match.

But this post is about the only spot of good news that this nation has seen in a while. It comes after a long and bitter spell of the last few years, filled with the news of war, suicide bombings and all kinds of catastrophes.

As usual, I found other stuff to do during tonight's Cricket World Cup Final. I didn't even know who we were playing against until after it had started, but the final victory was instantly apparent as screams of joy and a roar of fireworks went up all around my area.

Twitter screenshot for #PakCricket

Pakistan had won the final match against Sri Lanka and were this year's world champions. Even after midnight, the streets of Islamabad were littered with convoys of cars, music blaring and people waving flags. I couldn't even get near Jinnah Super because of the traffic jams and ended up going to F-6 to enjoy a few drinks and catch up with friends. In most of the country, the party may still be on at these wee hours of the morning.

It was amazing to see Pakistanis finally united on something. We were so focused actually that we made it to the top five trends on Twitter for a while. Didn't imagine Twitter being actively used by any but the most web-savvy Pakistanis.

Congratulations to all and here's hoping we can show the same kind of unity and enthusiasm in dealing with the barrage of problems plaguing us.

 

Liked this article? Make it popular:

Posted at 04:36am PKST  Comments(197) |

Saturday 20th June 2009

Using multiple broadband links from one system

Linux Internet

This is a piece I wrote a while back and lost when my hard drive died. Just found it again in one of the backups

These days, it's not uncommon to have multiple ways to access the Internet. It is quite likely that you have a home DSL connection and another wireless connection via your mobile device, albeit a lot slower than the DSL. But if you're anything like me, you had better keep a backup connection or two.

Until the recent disaster that wiped out most of my devices, I had DSL (from PTCL), a fiber-to-the-home connection (Nayatel) and a trial WiMax one (from Wi-Tribe that I'll soon have to start paying for), all without any limits on how much I could download (at least after 8pm). (I wrote the above part right after the burnout, but things have fully recovered since then)

The simple way to deal with that is to maybe use your laptop with one link and your PC with the other (assuming you have more than one system). However, there's another, geekier way which I discovered after going through a number of howtos and lots of experimentation.

I've configured my systems to route the traffic, first according to the destination, and secondly the system user. This means that I can fire up two separate browsers on the same system (more on that some other time), each using a different connection for the non-essential bandwidth usage.

Now for the nitty gritty (tested with Ubuntu 8.xx, but should work with any recent Linux distro):

  1. Firstly, make sure that the iproute package is installed
    apt-get install iproute
    (
    yum install iproute
    for RedHat based systems)
  2. Next, add your own definitions for your connections in /etc/iproute2/rt_tables (just a unique number and a descriptive string should do):
    101 nayatel
    102 ptcl
    103 witribe
  3. Then associate each table with a number so that packets marked by iptables can find their way:
    ip rule add fwmark 1 table nayatel
    ip rule add fwmark 2 table ptcl
    ip rule add fwmark 3 table witribe
  4. Delete any existing default route and add the relevant routes for each connection. I chose to have the PTCL connection as the new default route:
    ip route del default
    ip route add default via 192.168.0.200 table ptcl
    ip route add default via 192.168.0.100 table nayatel
    ip route add default via 192.168.0.300 table witribe
    ip route add default via 192.168.0.200
  5. Now simply use the mangle table and add iptable rules to segregate the traffic. In the example, I route all my important traffic through the Nayatel FTTH connection (mark 1) and the rest depending on the userid, but you can be as creative as you like:
    iptables -t mangle -A OUTPUT -d 66.240.221.0/255.255.255.0 -j MARK --set-mark 1
    iptables -t mangle -A OUTPUT -m owner --uid-owner 1020 -j MARK --set-mark 1
    iptables -t mangle -A OUTPUT -m owner --uid-owner 1034 -j MARK --set-mark 2
    iptables -t mangle -A OUTPUT -m owner --uid-owner 1043 -j MARK --set-mark 3

That's it. Sit back and let loose the fury.

The above steps are only valid for TCP or UDP traffic. ICMP (pings) will still use the default route so don't be surprised to have excellent ping times when you think the traffic should be going over wireless.

You can also go for a more sophisticated approach. Set a cronjob or your rc.local script to set the routes according to the time of day.

current_hour=`date +%H`
if [ $current_hour -gt 8 ] && [ $current_hour -lt 20 ]; then
	ip route add default via 192.168.0.200 table nayatel
	ip route add default via 192.168.0.200
else
	ip route add default via 192.168.0.100 table nayatel
	ip route add default via 192.168.0.100
fi

I'll leave the other possibilities up to your imagination, but it took a lot of digging just to get enough information to do the above. Hope it comes in handy to someone.

 

Liked this article? Make it popular:

Posted at 05:30am PKST  Comments(197) |

Saturday 6th June 2009

Suicide bombing at Rescue 15 compound

Pakistan Islamabad

There has just been a suicide attack on a police emergency station, right in the heart of Islamabad. The terrorist climbed over the fence of the Rescue 15 compound near Zero Point and opened fire on the security personnel inside. Upon retaliatory fire, he blew himself up, killing two policemen in the process and injuring several others.

I've always wondered What could drive someone to harm another human being, especially someone you don't even know and who is only doing their job. Forget about humans, what gives you the right to hurt any living thing?

It's an unforgivable crime when you kill others. Even worse when you take your own life in the process. But to do it in the name of religion? Especially a religion that preaches peace and tolerance? And to people who follow the same one as you claim to follow? I don't know what to say.

So what next? Do we just keep putting up with this? Isn't there anything that can be done about it? How about accepting some serious security measures? And I don't mean randomly placed road blocks.

Scan everything that gets in and out. Start treating the capital like an airport or a foreign country and gradually expand the security circle to include other areas. It might sound extreme and inconvenience us a little, but isn't it worth saving a lot of lives and achieving lasting peace?

 

Liked this article? Make it popular:

Posted at 21:49pm PKST  Comments(211) |

Thursday 4th June 2009

Dedicated to the brave soldiers

Pakistan

Today, I attended a prayer session at the parade ground in front of the president's house and the national assembly. It was to honor the brave soldiers that have fallen while defending the country against the Taliban insurgency in the North.

Candles were lit and slogans were chanted. Parents and children of some of those great men came forward to add their voices and were honored for their sacrifices.

Veteran Pakistani soldier

The most disturbing event was listening to a young veteran who was wounded at the front lines. He described learning of the deaths of people he knew. Of watching his friends and those under his command succumb to their deaths, right in front of his eyes. Besides those that have sacrificed their lives, there are countless others who have been permanently maimed or scarred.

The saddest part was that despite all this suffering, all the acts of valor and the successes that have been made against the extremists, some people have the audacity to call the whole operation (codenamed Rah-e-Rast or "righteous path") a sham and just an excuse to receive funds from Western powers.

Others have gone so far as to question the use of force against those that claim to be the soldiers of Islam, yet kill and know only the use of force, both clearly forbidden in the religion of peace.

This is a time for all of us to come together and play our part in supporting the troops and the almost 2 million people displaced by the conflict. The Pakistani army has always borne the brunt of criticism yet its the civilian government that needs to play a better role in dealing with the crisis.

May we achieve a swift victory against the insurgents and may peace and calm return to the once serene valley of Swat and the rest of Pakistan.

 

Liked this article? Make it popular:

Posted at 05:41am PKST  Comments(40) |

Thursday 7th May 2009

Pakistani shops in protest against Microsoft

Software Pakistan
Protest against Microsoft

I had gone to Islamabad's Blue Area today to buy a new power supply for my PC and was surprised to find a number of shops displaying signs such as this one. This sign says:

we strongly protest against Microsoft's abuses

Though I can't find much info on what this could be in response to, it is likely that Microsoft, through the Business Software Alliance (BSA), has been aggressive in going after businesses and individuals that use its software without purchasing a license.

Given that most Pakistanis are used to buying all the software they require for almost the price of a blank CD, this must be hitting the PC market pretty hard. Maybe that's why I couldn't find a decent PSU and there wasn't much of other gadgets and accessories either.

If software licensing really is being strictly enforced now, it may look like the end to cheap computers technology in Pakistan, but I see it as a positive sign. Only today, a chartered accountant friend of mine was curious about installing Ubuntu just to try it out and have a second operating system around.

Though a growing number of students these days have some level of passion and respect for Linux and open source, now is probably the time for average Pakistanis to realize the true value of these as alternatives to more traditional software.

 

Liked this article? Make it popular:

Posted at 02:12am PKST  Comments(6) |

Sunday 3rd May 2009

Searching with images

Internet
Herb with pink flower

I've come across a unique and interesting problem. I have this image of a plant (found on the hiking trail) that I think is a useful herb, yet I am unable to search and identify what it is.

Have tried Google's image search with numerous search terms such as "herb with pink flower" and "herb with pink flower and thin petals", but haven't gotten anywhere so far.

It would be so very useful to be able to upload an image and search for anything similar to it. Identify the species of snake that just bit you. Search for that cute girl on the opposite table. Find out if the mushroom is an edible one.

I'm sure Yahoo, the big G and Microsoft each have technology that can do some level of image matching, although at a high processing cost. Maybe they should offer such a service on an experimental basis.

 

Liked this article? Make it popular:

Posted at 15:00pm PKST  Comments(5) |

Wednesday 29th April 2009

Direct comments disabled

Blogging

I've been getting a huge amount of comment spam lately and until I get a chance to work on something to stop it, comments will be approved by hand.

 

Liked this article? Make it popular:

Posted at 20:42pm PKST  Comments |

Sunday 19th April 2009

Zorlu wind farm in Thatta

Pakistan Technology

Was quite surprised to see an inauguration ceremony of a new wind farm project in Thatta, Sindh, by a Turkish company (apparently with the help of the Chinese).

The farm will initially produce 50 megawatts of electricity and can be scaled up to 250 megawatts at a later stage. That alone won't be enough to meet the country's needs, but at least it's something.

Such a move was predicted by people when the power rates skyrocketed last year. It was said that the rates had been increased by the government to enable third-parties to come in and provide kickbacks through the fat, juicy contracts.

This may just be a conspiracy theory, but even if the corruption angle is true, at least we're getting a cool wind farm and another step forward in moving towards alternative energy technology.

 

Liked this article? Make it popular:

Posted at 12:56pm PKST  Comments(5) |

Monday 13th April 2009

Update for 2009 DST

Pakistan

As usual, the government has been late in announcing this year's daylight savings time schedule. So late in fact that the change didn't make it into the latest timezone file at elsie.nci.nih.gov which was last updated on the 6th of April.

Again, here are instructions for updating your Linux systems:

  1. Get the latest timezone data:
    wget ftp://elsie.nci.nih.gov/pub/tzdata2009e.tar.gz
  2. Extract the file for Asia:
    tar xzf tzdata2009e.tar.gz asia
  3. Edit the asia file and add these 2 lines below line 1596:
    Rule Pakistan   2009    only    -   Apr 15  0:00    1:00    S
    Rule Pakistan   2009    only    -   Nov 1   0:00    0   -
  4. Update the system timezone data for Asia:
    zic asia
  5. Copy the latest timezone file for Karachi (only required for Ubuntu and maybe other Debian derivatives):
    cp /usr/share/zoneinfo/Asia/Karachi /etc/localtime

That'll automatically set your time an hour ahead at midnight on the 15th of April (this Wednesday). There has been no announcement on the end date as yet so we'll assume it'll be the same as last year. November 1st.

Enjoy the extra daylight.

 

Liked this article? Make it popular:

Posted at 13:57pm PKT  Comments |

Tuesday 7th April 2009

Daylight Savings Time again

Pakistan

I've been searching in vain to find out if and when daylight savings time will come into effect this year. Instead, the answer found me when I went to bigtugboat this morning.

Though I'm unable to confirm from "official" sources at this moment, it will start from May 1st this year. Ubuntu's recent update of the tzdata package didn't contain this update either so there is still some doubt left, but I really hope it becomes a permanent thing.

Power savings may be negligible, but it definitely brings more light in our lives.

 

Liked this article? Make it popular:

Posted at 12:15pm PKT  Comments(2) |

Sunday 5th April 2009

The great electronic genocide

General

It may have been an awful April Fool's day prank, but someone went way overboard this time. It happened sometime Thursday morning, probably during the morning power outage, when a thief cut away and stole the electrical cables running to my house.

The 12, meter-long strips of thick and valuable copper wiring must have gotten them a couple days worth of meals, or more likely, a day's fix of hard drugs. However, it ended up costing me a lot more than the hassle of putting in new connections.

If lost productivity and income wasn't enough, by nighttime, all my equipment had been fried, probably when the electrician was starting the repairs. The deceased included a UPS that powered my ONT, my PC, the beloved LCD, the new speakers, a network switch, a wireless access point and most disturbingly, my laptop charger.

Needless to say, I was left completely stranded and was only able to get back online after buying a new laptop charger and getting the DSL connection back up. Fiber is still down and so is everything else.

If I'm lucky, I'll only need to replace the adapters and get done with small repairs. Else, there's going to be a huge hole burnt into my pocket.

 

Liked this article? Make it popular:

Posted at 18:18pm PKT  Comments |

Sunday 1st March 2009

IE for Linux: When will we see it?

Linux

The last few months, I was doing a lot less system administration, a little bit of project management and lots of web-related work (mostly on my blogzine).

Though Linux by itself can easily handle the first two jobs, as any web developer/designer will know, web design is a lot about making your site work consistently in different versions of Microsoft's Internet Explorer (which still lacks the equivalent of the blessing that is Firebug).

Developing a website requires easy access to the notorious browser and running it via WINE or in a virtual machine just isn't simple, fast or reliable enough (though, I did just fix a few CSS margin issues using ies4linux).

It is 2009. Linux is now mature enough to be considered an adult and is definitely here to stay. But why is Microsoft still ignoring it? Right now, Apple+Google are probably more of a threat to Microsoft than Linux has ever been.

Furthermore, Microsoft's biggest nemesis, Google, is benefiting greatly from its use of Open Source software. If Microsoft wants to have any edge over the big G, it should start to do the same. If the EU has its way, it will have to make some drastic changes anyway.

There definitely is a business case for supporting Linux. The only explanation I can think of for not supporting it is that it technically isn't possible. Like MS Office, the IE source code is such a mess that there is no easy way to port it to a new platform.

If that really is the case, it means that such Microsoft products simply can't evolve fast enough and could spell doom for the giant unless it does something fast. It could also be the reason why there still isn't an equivalent of Firebug for Internet Explorer.

A Linux version of Internet Explorer, as well as other Microsoft products for that matter, would be a huge help to Linux lovers (like myself) who struggle to develop for both IE and FF, ending up supporting only the latter.

Microsoft almost missed the boat when the Internet came along. It's about time they started taking open source seriously.

 

Liked this article? Make it popular:

Posted at 23:16pm PKT  Comments(5) |

Wednesday 18th February 2009

Nayatel fiber to the home

Islamabad Internet

Been pretty busy so a quick post after such a long pause.

Getting quite sick of PTCL. They took around 6 months to install a simple phone line and another few months before I had DSL at home. Then they billed me for all the time that I was waiting for them. All that despite knowing the right (or maybe wrong) people.

That's not all. My home wiring is so shoddy that I can only use one thing at a time; either the phone or the DSL. And from about a week back, PTCL has started some sort of filtering on web traffic. Websites open really slowly, if at all. HTTP requests keep timing out while SSH etc. continue to work just fine.

I happen to be lucky enough to live in an area rich in fiber and luckier still to get my hands on the pricey equipment required. So you can understand my excitement at the digging going on outside. Should have Nayatel's fiber connectivity (FTTH) by the end of the day.

No more unstable DSL. And no more low-performing, monitored PTCL connectivity. Maybe a little more blogging.

 

Liked this article? Make it popular:

Posted at 13:37pm PKT  Comments(2) |

Thursday 15th January 2009

Save Humans and mission Gaza

General

A friend of mine is actively working on a project by the name of Save Humans which aims to do what it says; save human lives. Currently, it is concentrating on the situation in Gaza where the number of people killed by Israel's offensive has exceeded 1,000 (including a disturbingly high proportion of women and children) with many more wounded. From the website:

Mission Gaza
We are a non-political on-line humanitarian forum working for humanity's welfare irrespective of religion, race or ethnicity.

There is a medical team ready which is awaiting permission from the Egyptian government to setup camp near the Rafah border and treat the wounded coming in. Besides monetary donations, they are looking for support in all forms, be it volunteers with medical experience or simply moral support and spreading the message.

Over at BoingBoing, there is a discussion in response to a post from a Red Cross worker in Gaza. Also worth a read.

 

Liked this article? Make it popular:

Posted at 23:32pm PKT  Comments(8) |

Wednesday 14th January 2009

US Presidents before and after

General

Here is what President Barack Obama might look like when he leaves office in eight year's time:

Obama after serving as president

Seems that being the president of the United States is such a stressful job that the wear and tear causes them to age twice as fast as an average person unless they maintain a very healthy lifestyle.

Though Obama has what it takes to overcome all this, his time in office may be the toughest we've seen in a while. Dealing with an ever-worsening global financial crisis and a serious situation developing in and around the Middle East, he'll have his hands full and all this could take its toll.

I have to wonder, is this kind of stress and accelerated aging common for all rulers? Can't be true for all rulers. Just look at our excuse for a prez. Wouldn't it have been a lot greater for other great leaders in history? How did the Prophets deal with it? Prayer? How did people like Alexander and the Caesars do (well, most of them did go a little crazy)?

Oh, do check out the Xerxy fun blog. Updated quite regularly with other fun stuff like the above.

 

Liked this article? Make it popular:

Posted at 11:01am PKT  Comments(3) |

Wednesday 7th January 2009

Ashura and its true meaning

General

The 10th of Muharram, or Ashura, is here after another year. This was the day when Imam Hussain (A.S.), the Holy Prophet (P.B.U.H)'s grandson, sacrificed his life, along with his followers, to preserve the sanctity and spirit of Islam.

Now more than ever, people around the world, including many that don't even belong to the Shiite sect or are not even Muslims but understand the significance, are mourning the events that took place at Karbala almost 1400 years ago. Without it, the light that is true Islam may have been extinguished forever and the ensuing darkness would have swallowed up the rest of the civilized world.

Though the annual event has become another ritual for many, what we must remember are the lessons it teaches us. To be strong in the face of injustice. To not bend to the will of evil, even when under pressure. Now, more than ever, we need to be strong and united and not give in to wrong and unjust demands.

The true path is never easy, but we must not stray from it.

 

Liked this article? Make it popular:

Posted at 21:02pm PKT  Comments(9) |

Sunday 4th January 2009

Pakistani bloggers forum

Pakistan Blogging

After the recent blogging meetups around Pakistan, which proved to be very successful, some of us felt the need for a central platform where Pakistani bloggers could communicate with each other. I especially wanted to get regular meetups going around the country and this would have been an ideal place.

Thanks to Teeth Maestro, a bloggers.pk forum is now up and running. bloggers.pk already provides an aggregator for Pakistani blogs and is an excellent tool to stay updated. Check it out and let's join hands in building a national blogging community.

 

Liked this article? Make it popular:

Posted at 16:33pm PKT  Comments(22) |

Friday 2nd January 2009

Israel and its helpless victims

General

For the last few days, I have been wanting to say something about the terror that is still being brought down on the people of Gaza by the state of Israel, yet I am too appalled, too shocked to come up with words that can do any sort of justice.

It is easy for us to condemn a single suicide bomber or mastermind behind an act of terror. How do you condemn a "cleansing" such as this? The world did nothing to stop the Holocaust. The world again did nothing to stop the Rwanda massacre. And it is still too crippled to do anything about the innocent civilians being killed.

Are we doomed to repeat history until we can no longer call ourselves human?

 

Liked this article? Make it popular:

Posted at 17:16pm PKT  Comments(3) |

Thursday 1st January 2009

Hope and 2009

General

2008 ends and 2009 begins. 2008 hasn't been the stable and prosperous year I had hoped for, but what can be done besides hoping for a better future. It is hope that keeps telling me that 2009 can't get any worse than 2008 was.

The biggest tragedies to scar my year included President Musharraf's removal, our new prez unelect, the Marriott hotel bombing in Islamabad, Israel's ongoing campaign of terror in Gaza, and a couple of personal ones.

Right now, the only positive events of 2008 that I can recall and think are worth mentioning are Obama's victory in the US presidential elections and the successful implementation of daylight savings time in Pakistan.

2009 is starting off pretty tough, with the global financial crisis still as troubling as ever and chances of outright war (in various parts of the world) increasing. However, there is hope. If we can survive through these troubling times (and I'm hopeful that we will), within a year, the world will be a far better place. Hope to see you all in a better future.

 

Liked this article? Make it popular:

Posted at 11:57am PKT  Comments(5) |

Previous Month's Entries
Next Entries