Thunderbird + Correct Indentity Plugin

Posted on the January 5th, 2011 under Linux,Productivity,Software and Technology,Usability by

On both Ubuntu (and Windows if I ever had to use it), I prefer Thunderbird as my email client over Evolution or MS Outlook purely due to two reasons:

  1. I love the way it allows one to show an inbox for each account. I do not need to filter them, or create labels.
  2. The ability to set a limit on incoming mail. Once activated, it only downloads the first 50kb of each email giving an idea of what the email contains, and it saves the frustration of downloading emails with large attachments, particularly from people I don’t know.

However, the one mistake I often make is clicking “Write”, type in the email, and clicking send, without checking that I’m sending it from the right email address. Fortunately, another great thing with Firefox and Thunderbird is extensions, and there is one that fixes that called Correct Identity.

It allow one to set an alternative default email address for writing an email. Eg. The account is support@…, but whenever you send out email from that account, it should be from tohir@…, that’s the issue it solves!

Why CSS gets confusing and why you should use SASS

Posted on the September 30th, 2010 under HTML, CSS,Internet by

Take the following HTML file with CSS. How will div2 look?

<html lang="en">

<title>SASS Test</title>

<style type="text/css">
    div.div1 div {
        border: 4px solid yellow;
        background: yellow;
    div.div1 {
        background: red;
        border: 4px solid blue;
    div.div1 div.div2 {
        background: green;
    div.div2 {
        border: 10px solid orange;
        padding: 10px;
    <div class="div1">
        Div 1
        <div class="div2">
           Div 2

Based on the last definitions, you will expect div2 to have:

  • a green background color
  • a 10 pixel solid orange border
  • a padding of 10 pixels between the border and the text

Actually it will appear like this:

It does NOT have a 10 pixel solid orange border, but instead a four pixel solid yellow border. Even though CSS is cascading, it cascades by CSS rules, not by definitions. Even though an alternate definition is last, if it doesn’t cascade over an existing rule, it will not be applied.

Wireshark Filters – Ajax Example

Posted on the September 30th, 2010 under Internet,Linux,Software and Technology by

I’ve blogged about Wireshark before, and how to use it for Ajax. Next is a quick tip on how to use Wireshark’s filters feature to only watch for AJAX requests. In the filter tab, enter:

http.request.uri contains "php" ||  http.content_type == "text/html"

This effectively reads, only log items where:

  1. The HTTP request contains PHP, OR
  2. The HTTP response is “text/html”

Wireshark Filters

Useful, dont have to wade through whats an Ajax response, bypass images, etc. One thing that would be nice would be if the area that shows the filter expression was longer!

Preparing For Hajj – Some tips for techno hajjis

Posted on the September 27th, 2010 under Internet,Islam and Muslims,Reflections/Thoughts,South Africa by

Going on Hajj nowadays is so much different from years ago. As someone that was fortunate to be there in 1995 and last year (2009), the differences were stark. No longer did we have queue for prepaid phones, we could video chat (skype) with our family back home. No longer did people have to wait for photos to be developed. We shared them immediately on Facebook. And yes, we took photos of ourselves inside the Haram and MMS’d it home!

Opting to take our gadgets also came with its own preparation. Having learnt from the advice of well-wishers, as well as mistakes from previous trips, here are some tips we can offer.

Electricity – Get a Travel Plug Converter

Saudi Arabia uses the Type F plug, South Africa the Type M. One Hajji noted that his hotel also had the Type G plug (as used in the UK), but this is very rare.

I found a travel plug converter at Diskem, but its generally available at stores like Cape Union Mart. Also try places that sell suitcases. Type G to Type M is easier to find and available at Clicks for instance, but rather take the Type F. This also makes a handy gift to Hujaaj!

We also took with a multiplug allowing us to comfortably power the laptop as well as charge our cellphones, camera battery, electric tooth brushes, electric shavers.

Saudi Arabia also uses 220V so there’s no need to change the voltage on your equipment.

Type F Plug

Type F Plug

Type M Plug

Type M Plug

Type G Plug

Type G Plug

WiFi and Internet

Even if Wifi is advertised  free in your hotel, it may only be available on a certain floor. Check with your travel agent whether the hotels you are staying in offer WiFi and whether WiFi is offered on all floors or just some. I found WiFi more available in Medina than in Makka. It may be because of the construction work, but speculation on my side.

Internet on your Cellphone

Have a habit of quickly checking Facebook on your cell phone, I was shocked to see how expensive this is with airtime just running away. My guess is that it costs something in the region of Rs2 (Saudi Riyals) a megabyte which would be more expensive than South Africa.

Tip: Keep this is mind that their billing rate may be different. Also check your airtime balance regularly, and modify the settings of programs that connect to the Internet. In my case, one of them was one that downloads the daily weather.

3G Internet for Your Laptop

It is possible to take your 3G card with and purchase a one 30 day data bundle from a service provider in Saudi Arabia. There are two advantages to doing this:

  • If your hotel does not offer WiFi on your floor, you can comfortably Skype and video chat with your family in the comfort of your hotel room.
  • If your package involves moving to Azizia, you’ll have Internet access there! Azizia is nice, but WiFi is not standard there 😉

Some tips on purchasing a data bundle

1) Saudi Arabia has two main operators: STC and Mobily. STC is the equivalent of Telkom, advertises everything but has nothing and unlikely to help you if they sense you are going to make them THINK or do some real work. The service from Mobily on the hand was wonderful. They knew their products, no queues.

2) Purchase the data bundle in Medina

Makka is full. Since it is also winter there, there is a shorter time between the Waqts and also to get to the Haram on time. By the time you get to the front of the queue, its time for Salaah. However, try and purchase it closer to the end of your stay in Medina, but with enough time to go back to them if any issues arise (about three days before you leave). A data bundle lasts for 30 days. The later you purchase your data bundle, the later for your stay in Makka you can use it. Otherwise you run in the dillemma of wanting to purchase a data bundle just a few days before Haj and risk losing the balance of data/airtime.

3) Requirements

I purchased the data bundle at the Mobily Store in Central Medina (opposite the Hilton hotel). They required a photocopy of my passport (which I did not have) but accepted my Al Anwar card. Best to take a photocopy of your passport with.

4) The connection settings for Mobiliy is built into Ubuntu, just setup a Mobile connection. For Windows users, they are:

Number: *99#
APN: web2

However, the pamphlet given is quite handy. The salesman will also tell you that you can bring your laptop to them and they will help you set it up!

AIR Time

Recharge Card

Recharge Card

Airtime is sold in various denominations. However, if you buy a larger, you stand to gain extra airtime. For example, a Rs100 airtime card gives your Rs150 airtime (cant recall exactly, but it was in this region).

Best of all, the cards have two scratch areas, so even if it is a single card, the airtime can go on to two phones. As they say in Cape Town, “Klap together”.

This also offers the opportunity for the budding entrepreneurs in Makka and Medina. Check that you are not paying the extra Rs50 when you dont have to. Also, some of them will sell you half the card for Rs75. There are so many of them, just walk away and move to the next guy.

Internet Banking

The number one rule: Update your profile to receive your One Time Password (OTP) via email. By default, most people receive their OTP via SMS. Unless you have international roaming activated and WORKING, you may not receive this, which may stop you from performing any transactions via the Internet.

Standard Bank users can only opt to receive their OTP via SMS or email. FNB users have the option of receiving the OTP via email in addition to SMS.

However, for both of them, you need to setup the OTP via email before leaving your hometown. Usually someone from the branch has to phone you, ask you to verify your details, etc. before they set this.

For Standard Bank, if you set up a recipient, you will not need to enter a OTP when doing a transfer to them.

ATMs, Banking in General

Please check that your card does not expire whilst you are on Haj. Banks usually have your new card a month before they expire, and you can request them to send you one earlier as well.

You are able to do cash withdrawals at Al Rajhi bank. In Makka, they are situated in front of the Hilton hotel. In Medina, there’s an ATM on the first floor of the Hilton Hotel. In most of the more modern malls, they do accept cards. Some of the smaller shops usually share one machine that services a group of them, so you may have to walk to another point to have your card swiped.


Make a checklist of all the wires and cables you need to take with. Its annoying to be on the other side of the world only to discover you dont have a cable you need.

Back Home Preparation

Apart from checking that you are hooked up, ensure that your family is likewise. Are they able to connect to the Internet, start skype, etc.? Does their webcam give a grainy or feed, etc.? Run a few checks before you leave, and also put them in contact with someone thats knowledgeable. If they are going to use someone else’s Internet connection, ensure that you have budgeted for this as well.


Where possible, assist your fellow Hujaaj if you can. The Holy Prophet Muhammad (PBUH) said that the best of people are those who assist others, and how much greater is this in the Holy Cities. If you find any of these tips handy, please make Duah that the Almighty grants the author to apply these tips himself in the Holy Lands, Insha Allah

[Video] Shaykh Sadullah Khan’s Khutbah at Claremont Main Road Masjid

Posted on the September 4th, 2010 under Internet,Reflections/Thoughts by

The khutbah is available online, but sometimes it’s just easier to watch it online.

Installing SASS 3.0 on Ubuntu 10.4

Posted on the July 9th, 2010 under HTML, CSS,Linux,Software and Technology by

Currently, the HAML/Sass version on Ubuntu is 2.2.17. Version 3, also known as Classy Cassidy, includes new features. So how can you install it on Ubuntu.

Firstly, you need Ruby:

sudo apt-get install ruby

Thereafter (without sudo):

gem install haml-edge

This will install Haml and Sass into your directory, but at least you will have access to the latest version. Message that appears:

WARNING:  Installing to ~/.gem since /var/lib/gems/1.8 and
 /var/lib/gems/1.8/bin aren't both writable.
WARNING:  You don't have /home/tohir/.gem/ruby/1.8/bin in your PATH,
 gem executables will not run.
Successfully installed haml-edge-3.1.49
1 gem installed

You can test that it is the latest version by:

~/.gem/ruby/1.8/bin/sass -version

Which should return:

Haml/Sass 3.1.49 (Bleeding Edge)

Lastly, there is a nice command to watch files and auto generate an updated version:

~/.gem/ruby/1.8/bin/sass -t compact --watch [inputfile]:[outputfile]


~/.gem/ruby/1.8/bin/sass -t compact --watch browseView.scss:browseView.css

Blocking Search Results in Google

Posted on the May 20th, 2010 under Internet,Software and Technology by

I find it quite annoying that when ever I do a search related to ExtJS, two sites ( and are on the first page of results. These two sites simply aggregate ExtJS forum posts, and then present them in a SEO friendly page.

Given this, I took to finding a way that can block search results. Officially, there’s no way you can do that from within Google settings (which would have preserved that as you moved from machine to machine), but there are extensions for Firefox. Still looking for a Chrome one!

For Firefox, there are a few extensions. One is CustomizeGoogle, but it doesnt work in the latest version of Firefox.

The one that does work is SurfClarity. It allows you to list of a sites that should be filtered out. It doesn’t do it from the server-side which would save a 1kb of traffic, but nonetheless is good enough.

How to Loop through the Properties of an Object in JavaScript

Posted on the May 10th, 2010 under Internet,JavaScript by

for (var key in object) {
    alert('value of '+key+' is '+object[key]);

Wireshark and [truncated]

Posted on the May 10th, 2010 under Internet,Linux by

I’ve posted a tutorial on how to get wireshark up and running on Ubuntu. The one problem , though, is that sometimes (actually often) you get [truncated]. How can you untruncate or turn it off or increase its size.

This isn’t the answer, but a way of how to get access to the full response:

Right Click on the Packet in Line-based text data, then choose Copy > Bytes (Printable Text Only).

This will place the full response, and you can paste it in a text editor.

Starting to like the toolbar in Ubuntu 10.4 file manager

Posted on the May 4th, 2010 under Linux,Software and Technology by

The one thing that horrified me in the latest version of Ubuntu was the ‘new’ toolbar for Nautilus or the file manager.

However, after reading Deconstructing Nautilus and rebuilding it better, I have to admit, I enjoy it. Why?

Even though I tend to browser elsewhere by typing in the path, the UP button is probably the most used button by myself. Switching to the location bar provides no alternative, but keeping the button bar allows one a form of up button.

Secondly, CTRL+L is probably something I can live with.

Given the whole debate around this, the lesson I believe is that don’t ignore your existing users. If you are going to change something, inform your users!

Given the opensource community spirit, it wont be long before someone does a quick script to bring back the old toolbar. If you are looking to do that today, have a look at: