Number of tweets?

09/10/2010

This is what I saw on Socialite, when I launched it today. That’s a whole lot of tweets to go through :)

iPhone surgery

07/13/2010

Just finished a scary but successful procedure on my iPhone 3G, Alhamdulillah. When iOS4 was launched, I upgraded, jailbroke and unlocked it. In hindsight this wasn’t a good decision. My phone got slow and sluggish. I knew I had to go back to the previous version of the software as the iPhone 3G specs are just not worthy of iOS4. What I needed to do was:
1. downgrade from jailbroken iOS4 to iPhone OS 3.1.3
2. jailbreak iPhone OS 3.1.3
3. unlock my iPhone

A quick glance on the internet returned nothing. So I took a stab at it and the effort was fruitful in the end. Leave a comment if you want to know the details.

What’s your excuse?

04/01/2010

A friend recently sent me this email. It served as a good reminder and thus wanted to share.

I would like to share my personal experience of 3 individuals whom is saw in Masjid during these days in Hyderabad and Chandigarh.

  1. First Person was a blind man. I used to see him in my local Masjid (Hyderabad). He used to be present for every Maghrib prayer, climbed stairs, goes to last row, prays there and then leaves.
  2. Second person was a man who could not walk. He used to come to masjid (Chandigarh) for Duhar prayers on Crutches. He used to make wadoo and then offered prayers while sitting.
  3. Third person was a man whose right hand was paralyzed. I only saw him couple of times in my local masjid (Chandigarh). He used to leave his right hand hanging and pray with left hand (for takbeer, during reciting, and so on)

If people who have these problems can come to Masjid and pray then why cant we do the same when we have everything?”It was not brought down to earth by an angel, rather Allaah wanted to bless His Messenger Muhammad (peace and blessings of Allaah be upon him) by taking him up to heaven and addressing him directly concerning the obligation of prayer. This is something that is unique to prayer among all the rituals of Islam. ”

“It was narrated that Jaabir ibn ‘Abd-Allaah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Between a man and shirk [associating others with Allaah] and kufr [disbelief] there stands his giving up prayer.” Narrated by Muslim, 82.”

“It was narrated that Abu Hurayrah (may Allaah be pleased with him) said: I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: “The first deed for which a person will be brought to account on the Day of Resurrection will be his prayer. If it is good then he will have prospered and succeeded, but if it is bad then he will be doomed and have lost. If anything is lacking from his obligatory prayers, the Lord will say, ‘Look and see whether My slave did any voluntary prayers, and make up the shortfall in his obligatory prayers from that.’ Then all his deeds will be dealt with likewise.” Narrated by al-Nasaa’i, 465; al-Tirmidhi, 413.”

This is a reminder for all of us. I ask Allaah to help us to remember Him, give thanks to Him and to worship Him properly.

Imtiaz …

Now tell me, what excuse do you have?

Growl notifier for mac’s battery status

02/09/2010

There have been many times that my macbook’s battery is almost running out and about to die and I don’t pay attention to the icon in my menubar. The warning itself appears only when the battery level is 10% remaining. Recently however, this problem started causing more pain. My battery needs to be replaced, because of which at about 23% the machine will just shutdown. So I wrote a small script that calculates the battery power and along with some launchctl magic and growl, I now get a notification when my batter level is below 30%.

Here is what you need to do. Download growl 1.2 from here and install it. If you are using Adium you will most likely already have growl. To test, run this command in your terminal after you install growl.

growlnotify -m "test message"

The code for getting the battery capacity notification is below

#! /bin/bash
NOTIFICATION_THRESHOLD="30"
#this works only on snow leopard 10.6.
charge=`/usr/sbin/ioreg -l | /usr/bin/grep -i capacity | /usr/bin/tr '\n' ' | ' | /usr/bin/awk '{printf("%.0f",$10/$5 * 100)}'`
if [ $charge -lt $NOTIFICATION_THRESHOLD ]; then
message="Battery power level is $charge%"
/usr/local/bin/growlnotify -t "BatteryNotifier" -s -m "$message"
fi

The full paths are essential for the next step. Save the above in a file, make it executable with ‘chmod +x’ and run. You will not see anything if your battery charge is above 30%. In order to run this as a cronjob or daemon process create a file of type launchd.plist in
~/Library/LaunchAgents/
and give the file a unique name. My file is named com.abuhafsa.BatteryNotifier.plist.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>com.abuhafsa.BatteryNotifier</string>
        <key>ProgramArguments</key>
        <array>
                <string>/opt/scripts/daemons/battery_notifier.sh</string>
        </array>
        <key>StartInterval</key>
        <integer>300</integer>
</dict>
</plist>

Remember to change the location of the script to where your file is stored. The ‘StartInterval’ is time in seconds. Change it to whatever you desire and the script will run at that interval. Now logout and log back, which will enable launchctl to add this daemon to its list of tasks.

Steve Jobs presentation style

02/01/2010

Recently I was discussing with my manager and a colleague on tips to give a great presentation. Some of the points we talked about

  • Keeping the audience on their toes
  • Having the air around energized with excitement
  • Showing passion for what you are presenting

These tips don’t necessarily have to be observed when delivering a keynote or launching a product or marketing etc. It could be used at your next sales meeting, team meeting or just about any meeting. I wanted to add one more to the 3 tips above. Using positive adjectives! No matter what it is you are talking about, use as many positive adjectives you can. It will give your audience a sense of enthusiasm. As an example, watch this video. Kudos to who ever made it. This is the iPad launch, by one of the most eloquent CEOs that can present with a flair.