Download API Tools from

Extract the zip file to C:\ folder (to avoid paths with quotes issues in windows). I also renamed the folder to “ec2-api-tools”

Set Java Home Environment Variable. Usually this looks like “C:\Program Files\Java\jrexxx”. Find out exact path on your computer

From Command Prompt

> cd C:\ec2-api-tools
> set JAVA_HOME=”C:\Program Files\Java\jre6″

Set EC2_HOME variable

> set EC2_HOME=C:\ec2-api-tools

Now Get Private key and Certificate Files and keep in C:\ec2-api-tools\keys\ folder for convenience.

Now you can test api-tools

> C:\ec2-api-tools\bin>ec2-describe-availability-zones -K C:\ec2-api-tools\keys\pk-xxx.pem -C C:\ec2-api-tools\keys\cert-xxx.pem


Most common database used with Rails is mySQL but if you ever need to use SQL Server, here is a quick how to.

I am using  Windows Vista, SQL Server 2008, Rails 2.2.

1)  Install  activerecord-sqlserver-adapter gem

 > gem install activerecord-sqlserver-adapter


2) Create a new Login for this new database (say testuser) using SQL Server Management Studio


3) Create a new database in SQL Server 2008 for your project (say testproject) and choose testuser as Owner


4) Create a new ODBC DNS

Control Panel -> Administrative Tools -> Data Sources (ODBC)


Add a new ‘User DSN’,  choose SQL Server,  give a name for DSN (say testprojectconn) then configure SQL Server authentication.

5) Now create your rails application as usual.  Configure db connection using database.yml as follows

  adapter: sqlserver
  mode: odbc
  dsn: testprojectconn
  host: localhost
  username: testuser
  password: testpass
  encoding: utf8

Thats it!

To be more precise, the security hole is with the network (AT&T network) IPhone uses. I noticed this problem while working on a Voice-enabled application using Asterisk and surprised to see that my voicemail is wideopen to public. Then later found out that this has been reported earlier by various folks (here and here) but seems like it is not fixed yet. So if you own an IPhone (or any other phone for that matter) with AT&T network, please keep  reading and I show you how to fix the problem yourself.

So what is the problem?

Others can listen to your voice mail, change your personal greeting and other settings.   AT&T voicemail identifies user based on incoming caller ID, so if callerID matches the phone # you are calling from, it assumes that you are calling yourself to check voice mail then it simply goes to voice mail (if you don’t have password set).

Am I protected or Not?

 Call yourself with your phone (by dialing 1 or dialing your number).  If you are prompted for a password, then you are fine.  If it takes your directly to  voice mail menu, then you are NOT secured. See how to set password below.

How to protect my voice mail?

Dial 1 to call Voicemail from your phone

Press * to get to the voicemail Main Menu

  • Press 4 for Personal Options
  • Press 2 for Administrative Options
  • Press 1 for Passwords
  • Press 2 to turn password on
  • Select any random 4– to 14–digit password


Why I am blogging this?

 I don’t know if new AT&T users may be forced to set password or not, but when I got my phone couple of years back and my voicemail was setup without password.  It ended up that most of my friends with IPhone also don’t have password setup for voicemail because simply they are not aware of the security hole.   With easy access to Open source PBX like Asterisk or spoofing calling cards, its not hard to exploit this security hole.  So if this blog helps people to realize how important is to set password, then my job is done.


The opinions expressed in this blog post are my own and not of any company. The usual standard disclaimer applies, especially the fact that I am not liable for any damages caused by direct or  indirect use of the information.  I bear NO responsibility for content or misuse of this information or any derivatives thereof.  This post is NO WAY intended  to blame anyone, especially  AT&T.  They may have already posted about this issue somewhere on their website. 

“If it is fast and ugly, they will use it and curse you; if it is slow, they will not use it.”- David Cheriton,  The Art of Computer Systems Performance Analysis (From

Weighing cost versus reliability is always a difficult choice in systems administration. (From

I have noticed that people who hate George Bush also hate internet explorer and Windows in general. You people are mentally ill, sorry to say. (From )

I was looking at Peter Bromberg’s post “Build a dynamic progress page” which is about creating a “Loading” page for time-taking webpages. The problem with Peter’s solution is if your destination page has more than one query string params, then it wont work. Another small problem is non-standard DOM access which wont work in non-IE browsers (it was written almost five years back so it might not a big concern at that time)

Here is the modified code to make it work with query string AND non-IE browsers.

The basic idea is having a transient ‘Loading’ page which loads the time-taking page in the background and in meantime show a nice animated progress bar. Lets name our middle page ‘loading.aspx’


Header section has javascript code to show, hide progress bar while loading the destination page


Body has nothing but visual element for progress bar. Note that we are calling Begin() on body load and End() on unload.




In the code-behind, destinal URL is generated.



Finally, to use this page to call a time-consuming page (say  longloadingpage.aspx) which takes ID1 and ID2 as query params  simply call


Houston Techfest

January 21, 2009

For folks in houston area, remember that this weekend we have wonderful Techfest at University of Houston. Visit and register.  It features lot of exciting sessions in .NET, Java and Rails. And best of all its free.

See you there!

Change Time Zone in  Linux

ln -sf /usr/share/zoneinfo/US/Central localtime
Create Softlink for a Folder

ln -s /postgresdata/data data
(now  data is a link which points to /postgresdata/data)

Format a newly added Device and Mount

mkfs -t xfs /dev/sdf
mount /dev/sdf /postgresdata

Install XFS programs on Linux

yum install xfsprogs