Author: rahul

  • Vanilla ice cream vs general motors

    Vanilla Ice Cream that puzzled General motors!!!!

    An Interesting Story

    Never underestimate your Customers’ Complaint, no matter how funny it might seem!

    This is a real story that happened between the customer of General Motors and its Customer-Care Executive.

    A complaint was received by the Pontiac Division of General Motors:

    ‘This is the second time I have written to you, and I don’t blame you for not answering me, because I sounded crazy, but it is a fact that we have a tradition in our family of Ice-Cream for dessert after dinner each night, but the kind of ice cream varies so, every night, after we’ve eaten, the whole family votes on which kind of ice cream we should have and I drive down to the store to get it. It’s also a fact that I recently purchased a new Pontiac and since then my trips to the store have created a problem…..

    You see, every time I buy a vanilla ice-cream, when I start back from the store my car won’t start. If I get any other kind of ice cream, the car starts just fine. I want you to know I’m serious about this question, no matter how silly it sounds “What is there about a Pontiac that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?” The Pontiac President was understandably skeptical about the letter, but sent an Engineer to check it out anyway.

    The latter was surprised to be greeted by a successful, obviously well educated man in a fine neighborhood. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the ice cream store. It was vanilla ice cream that night and, sure enough, after they came back to the car, it wouldn’t start.

    The Engineer returned for three more nights. The first night, they got chocolate. The car started. The second night, he got strawberry. The car started. The third night he ordered vanilla. The car failed to start.

    Now the engineer, being a logical man, refused to believe that this man’s car was allergic to vanilla ice cream. He arranged, therefore, to continue his visits for as long as it took to solve the problem. And toward this end he began to take notes: He jotted down all sorts of data: time of day, type of gas uses, time to drive back and forth etc.

    In a short time, he had a clue: the man took less time to buy vanilla than any other flavor. Why? The answer was in the layout of the store. Vanilla, being the most popular flavor, was in a separate case at the front of the store for quick pickup. All the other flavors were kept in the back of the store at a different counter where it took considerably longer to check out the flavor.

    Now, the question for the Engineer was why the car wouldn’t start when it took less time. Eureka – Time was now the problem – not the vanilla ice cream!!!! The engineer quickly came up with the answer: “vapor lock”.

    It was happening every night; but the extra time taken to get the other flavors allowed the engine to cool down sufficiently to start. When the man got vanilla, the engine was still too hot for the vapor lock to dissipate.

    Even crazy looking problems are sometimes real and all problems seem to be simple only when we find the solution, with cool thinking.

    What really matters is your attitude and your perception.

  • Pidgin Master Password Patch

    Pidgin stores the passwords of the accounts in plain text in a xml file (i.e. if you have enabled the “save password” option for the accounts). Anyone who can get read access to this xml file (accounts.xml) will know the passwords of all the accounts for which you have chosen to save the password.

    This patch (written by Dooglus) allows you to have a master password for encrypting the passwords of the individual accounts. This is similar to the master password feature provided by Thunderbird / Firefox (and I think this also uses the same encryption method as that used by Thunderbird / Firefox).

    Source Installation (in Linux)

    Installing Pidgin dependencies

    If using Debian Lenny, you can install the dependencies using apt-get:

    # apt-get install cdbs debhelper libgtk2.0-dev libxss-dev libmeanwhile-dev libgadu-dev libnss3-dev tcl8.4-dev tk8.4-dev libgstreamer0.10-dev libgtkspell-dev libltdl3-dev libperl-dev libstartup-notification0-dev libzephyr-dev libxml2-dev libebook1.2-dev libedata-book1.2-dev libcamel1.2-dev libdbus-glib-1-dev dbus python libavahi-client-dev libavahi-glib-dev libxml-parser-perl libncursesw5-dev libsasl2-dev xsltproc doxygen libsqlite3-dev libsilc-1.1-2-dev

    Alternatively, if you have the source repositories enabled, you can just run:

    # apt-get build-dep pidgin

    Installing Patch dependencies

    # apt-get install libnss3-dev libnspr4-dev

    Applying Patch

    Download the pidgin source (pidgin-x.x.x.tar.bz2) from here and the master password patch (pidgin-x.x.x_master-password.patch) from below. Extract the source and apply the patch.

    # tar -xvjf pidgin-x.x.x.tar.bz2
    # cd pidgin-x.x.x
    # patch -p1 <../pidgin-x.x.x_master-password.patch

    Compiling and Installing Pidgin

    Once the dependencies are installed and patch is applied, pidgin can be compiled and installed as usual.

    # ./configure --prefix=/opt/pidgin
    # make
    # make install

    After pidgin is installed, you can run it using:

    # /opt/pidgin/bin/pidgin

    and set the master password through Tools -> Preferences -> Security.

    Windows Binaries

    Following the instructions given at http://developer.pidgin.im/wiki/BuildingWinPidgin, I was able to build windows binaries. Also note that GTK+ for windows has to be installed as a prerequisite and it can be downloaded here. If you are using Win9x/Me, download and install GTK+ version "2.6.10 Rev A".

    pidgin-2.3.1_win32.zip
    pidgin-2.4.1_win32.zip
    pidgin-2.6.2-win32-bin.zip
    pidgin-2.6.2.exe
    pidgin-2.6.2-no-gtk.exe
    pidgin-2.6.2-debug.exe

    Patches

    pidgin-2.3.1_master-password.patch
    pidgin-2.4.0_master-password.patch
    pidgin-2.4.1_master-password.patch
    pidgin-2.4.2_master-password.patch
    pidgin-2.4.3_master-password.patch
    pidgin-2.5.4_master-password.patch
    pidgin-2.6.2_master-password.patch

    It should be noted that these patches might work for other pidgin versions as well. While patching the source, if any of the files are not patched properly, the failed hunks are put in a .rej file for inspection and the rejected changes can be merged manually.

    References

    http://dooglus.rincevent.net/gaim/

    Fix for Master password expose for Pidgin

  • File Encryption Using GPG And Editing Using Vim

    File encryption is a useful feature. Especially if you want to store some sensitive information in a file on your PC or mail someone a file with sensitive data. GPG allows us to encrypt files using either a password or public-private-key pair. Further, a vim plugin is available which allows you to edit the gpg file directly. Though vim by default provides encryption support for files (using the -x option), the encryption algorithm is weak. GPG provides a great alternative for strongly encrypting files. Below are a few links which should help you understand about GPG and also use vim for GPG encryption. Also note that you might need vim and not vim-tiny for this plugin to work properly.

    http://en.wikipedia.org/wiki/GNU_Privacy_Guard
    http://advosys.ca/viewpoints/2006/07/pgp-symmetric-encryption/
    http://vim.sourceforge.net/scripts/script.php?script_id=661

  • Lessons of the Square Watermelon

    Japanese grocery stores had a problem. They are much smaller than their US counterparts and therefore don’t have room to waste. Watermelons, big and round, wasted a lot of space. Most people would simply tell the grocery stores that watermelons grow round and there is nothing that can be done about it. That is how I would assume the vast majority of people would respond. But some Japanese farmers took a different approach. … Read the complete article.

  • Choosing A Web Hosting Provider

    My site had faced a big downtime last week – for 4 consecutive days. Thanks to the then hosting provider Powweb, I had to face this problem. As a matter of fact, I had sent them a mail immediately when my site went down. They took 2 days to respond and said that the problem was fixed. But even after an additional 2 days my site was still down. This along with the fact that even previously there were frequent downtimes (about 2-3 hours per week) made me switch my hosting provider.

    To know which hosting providers are good, I started reading many reviews. But I soon realized that actually most of the review sites are affiliates and so give biased reviews. But there were four hosting providers which I’ve found had consistently good reviews (I was especially concentrating on those which provided SSH access) – LunarPages, Bluehost, Host Monster and Host Gator.

    Lunarpages would have been the obvious choice if not for the fact that it did not provide SSH access (Lunarpages now provides SSH access on its shared hosting as well. But I was so impressed with my provider Host Gator that I continued with it). I had already used Bluehost and it was good but I found their servers a bit slow. Hostmonster, a subsidiary of Bluehost seemed to be having the same features of Bluehost but for a slightly cheaper price. I was not sure whether to go with Host Monster or Host Gator as they had almost identical features (http://www.hostingmatrix.org/shared/compare/HostGator-Baby+HostMonster) but finally I decided to go with Host Gator as it seemed to have marginally better reviews than Host Monster and also Host Monster did not support wild-card SSL certificates (or certificates for add-on and sub-domains) which I really needed. You can read independent reviews about both of them at http://www.hostmonsterreview.org and http://www.hostgatorreview.org.

    And oh boy I should agree, this was perhaps the wisest choice I had made. Not that Host Monster is bad (I actually never used it) but that Host Gator is simply awesome. I AM BEYOND WORDS OF PRAISE FOR THEIR SUPPORT AND SERVICE. Actually a week after signing up with Host Gator I realized that Host Monster offers a free domain where as Host Gator did not offer any free domain but I am so immensely satisfied with Host Gator that this hardly matters. Also I took the 2 year plan rather than the one year plan as it was benefiting me considerably because of the 20% discount which is valid upto Feb 1st. Moreover Host Gator comes with a 45-days full money back guarantee and even later you can decide to opt out of their service any time (and you will get a refund on pro-rated basis). Most of the times, there are coupons available for the major hosting providers. Be sure to google and use such coupons for getting discounts.

    Overall I am very pleased with Host Gator. They understand customer needs very well. The Live Chat responds in less than 2 mins and very courteous. They might not be able to solve your problem immediately but give you the right pointers. Keep up the great work Host Gator.

    Visiting the sites of the above mentioned web hosting providers, should give you an idea about what you can expect from shared hosting providers. DreamHost and Site5 offer many more features for the same price but they had mixed reviews. Also I had few other doubts while choosing a hosting and I have mentioned these below. I have also stated their status with respect to Host Gator (I will try to keep this list as updated as possible).

    1. I already have a domain and I make a lot of modifications in DNS records of its sub-domains. I understand that cPanel does not provide me the facility to modify the DNS records of sub-domains. I would like to know if I can continue maintaining the domain at my current registrar and point the A record of the domains which I plan to host at your company to the IP provided by you. Will this work or is it mandatory that I change the NS records of my domain? If it is mandatory, can I at least raise service requests to change the DNS records of my sub-domains?

      Yes it is possible. Changing the NS records is not necessary as long as the A and MX record entries of your domain point to Host Gator. Also if you decide to set the NS records to that of Host Gator, you can always raise support tickets to change the A/MX record of any sub-domain.

    2. I have .name and .in domains. Can they be hosted at HostGator as well?

      Yes

    3. Right now I plan to purchase the HostGator baby plan for one year which is about 120 USD. But by applying the new year coupon, I can get 20% off. After the completion of one year, I’d have to renew again. I’d like to know if there are any coupons like the current one next year, can I use it to avail the discount then? Or are these coupons only for new accounts?

      These coupons are generally applicable only for new accounts.

    4. Are the following supported on SSH?

      – rsync for remote backup
      – vim enhanced (I am especially looking for syntax highlighting / vim color editing)

      Yes. I had to raise a service request for installing vim enhanced though.

    5. Which of the following versions are offered?

      – Apache 2
      – Mysql 5
      – PHP 5

      Apache 1.3.39, Mysql 5 and PHP5. Be sure to first have mysql 5 enabled before configuring your account as this involves moving Mysql 5 to a different server.

    6. I shall also be using php5. Is it possible for having a custom php.ini file?

      Yes

    7. Can I use any third party modules for php and perl? Do you support installation of some custom modules (which of course are not expected to consume any resources)?

      Yes. It depends upon the modules which you want to have installed.

    8. Is webdav supported?

      Nope.

    9. I understand that if I cancel my account within 45 days of activation, the entire amount will be refunded. But I would like to know if it is feasible to cancel my account after 45 days? Will there be some kind of refund (at least partial) be provided?

      Yes money will be refunded on a pro-rated basis.

    10. Are the following outgoing ports allowed access from SSH

      – HTTP
      – HTTPS
      – SSH
      – FTP
      – IMAP

      Yes. IMAP was originally blocked but when I explained to them that I needed it to be open for moving my mails from my previous hosting provider to that of Host Gator, they immediately opened it.

    11. Is there any process limit?

      There is a process limit of 25 per account. In case this limit is exceeded, you may get strange errors such as site throwing errors, ssh giving resource unavailable error. In such a situation you can kill the current processes by executing “pkill -u userid” from shell or raising a support ticket to do the same.

    12. Is Dedicated IP offered?

      Yes, for an additional price.

    13. Are Shared and Private SSL offered?

      Yes. Shared SSL is offered for free. Private SSL will cost extra.

    14. Can we use our own private SSL or should we mandatorily purchase the SSL from you?

      You would need to have your cert reissued if you want to use it here, but we can install it after it’s been reissued for you. We can install it here for a $10 fee. As long as everything matches the certificate to your domain, any CA is alright. You also need to purchase a dedicated IP though.

    15. Could we use private SSL for an add-on domain or sub-domain or is it restricted to primary domain?

      It can be installed for an addon or sub if it’s issued for it.

    16. Are wild-card SSL certificates allowed. Do they apply for sub-domains as well as add-on domains?

      Yes (One of the support personnel told me that the CSR has to be mandatorily generated on their machine but this is actually not necessary. You only need the rsa key and valid certificate issued by CA to have it installed on their server).

    17. Can I change my primary domain? Does it cost me extra?

      Yes. Please fill out the form at https://secure.hostgator.com/changedomain.php.

    18. Do you provide backup MX service?

      Nope.

    19. If you provide SSH access, does it provide public key authentication?

      Yes.

    As a small request, if you have found the information in this blog useful and have decided to buy an account, kindly click on Host Gator or on the Host Gator banner in this site just before you sign-up with them. This will help me make a few bucks through the referral program (you could consider this as a donation or incentive for sharing information like this :)). Also note that this does not have any effect on the sign-up offers (coupons) that you would like to avail.

  • Need for Backup

    Note: See also the follow up to this article about some of the Linux Backup Solutions

    Some things are learned the hard way and the importance of taking backup was among those. While I will not get into the details about how to take backup I just want to stress on the importance of backups. Just consider one of the following real-life scenarios:

    1. There is a huge power fluctuation and your entire hard disk gets destroyed.

    2. You are moving your PC / laptop around, it suddenly slips from your hand and resulting in your hard disk crashing.

    3. You are very sleepy and accidentally delete some important folder.

    4. You have all your blogs on wordpress or some free hosting provider. You write about some controversial issue and your blog hosting provider deletes your entire site without giving you any explanation (ever bothered to read the agreement to which you agree while opening an account?)

    5. You access your mails from everywhere. Someone who is really pissed off with you by some means gets access to your account password and deletes all your mail.

    These are all very real life situations which I have either encountered or seen someone else encounter. Hence I strongly suggest that you take regular backups of all your important data (it might not be necessary to take Operating System backup but if you do it will be helpful for recovering quickly in case of an eventuality).

    I use dar combined with SaraB and cron to take nightly backups to an external hard disk. And then once in a month I copy these backup files to DVD for offline storage. Apart from dar, there are many tools available in linux for helping you to take full and differential backups. I personally prefer dar because it is simple and has some nice features such as compression and automatic splitting if the backup image size exceeds a particular size so that it will fit on backup media such as CDs / DVDs.

    Similar to linux, Windows will also have many backup software available for free including the backup utility which ships default with Windows. Also if you google around, you should get articles related to how you can take backup of your blogs/websites and emails.

    So don’t be a fool like me and wait till disaster strikes. Instead start taking backups today and sleep peacefully.

  • Mail Retriever

    A mail retriever is used to retrieve mails from remote mail servers. This is especially useful if you want to retrieve mails from remote mail servers and deliver it to your local mail server or store in your local machine.

    Fetchmail and getmail are mail retrievers which enable you to retrieve mails using the standard protocols such as IMAP and POP3. But for Yahoo and Hotmail, there is no support for IMAP/POP3. But not to worry as we have similar programs to retrieve mails from Yahoo and Hotmail known as fetchyahoo and GetLive respectively.

  • Setting Up Mail Server (With MDA, IMAP And Webmail)

    Mail Server

    Using your own mail server, you can have mails delivered directly. Certain things I looked out for while choosing a mail server for my personal use:

    – Support for regular operating system accounts (unix logins)
    – IMAP support (either inbuilt / external)
    – Webmail support (either inbuilt / external)
    – Maildir format supported
    – (Sieve) Server side filtering (http://www.debian-administration.org/articles/244)
    – Ease of installation

    I’ve explored some mail servers. Sendmail’s configuration and maintenance are difficult. qmail is difficult to install and in-built features are less, but this is the most popular MTA I guess. Exim or Postfix is what I’d recommend because of their ease of installation, maturity and extensibility. Here is a quick tutorial on setting up postfix in Mepis. Be sure to have a backup mail server if you are setting up your own mail server for higher reliability.

    Mail Delivery Agent

    A mail delivery agent (MDA) / mail filter is used to process the mail which is received and enables to perform actions such as moving that mail to a specific folder or forwarding it to another email id depending upon the rules you mention. Procmail and maildrop are two very popular MDAs. While procmail seems to be more widely used, I’d highly recommend maildrop for its ease of setup and use. Here is a small tutorial on setting up maildrop with postfix. Visit the maildrop page on Wikipedia for further references.

    IMAP Server

    I’ve used Courier-IMAP server for some time. But later I shifted to Dovecot. Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It’s fast, simple to set up, requires no special administration and it uses very little memory. Here is a brief tutorial on setting up dovecot on Mepis

    Webmail
    Squirrelmail is one of the first webmail clients. A relatively new webmail client which I have found to be extremely impressive is Roundcubemail (this uses Ajax).

    Some other relevant links:

    List of mail servers (this list is huge) – http://www.emailman.com/unix/servers.html
    Comparison of mail servers – http://www.geocities.com/mailsoftware42/, http://shearer.org/en/writing/mtacomparison.html)
    Setting up Courier – http://www.courier-mta.org/install.html
    Configuring mail clients for Courier-IMAP – http://www.trekweb.com/~jasonb/articles/exim4_courier/confclient.html
    Exim + Courier-IMAP – http://www.trekweb.com/~jasonb/articles/exim4_courier/exim4.html
    Setting up Qmail – http://www.lifewithqmail.org/lwq.html

  • Adding JPEG Comments

    MaPiVi is a photo organizing software which can be used to add comments to JPEG files (always take a backup of your photos as this software works on it directly). However, MaPiVi is no longer being maintained actively. Another graphical tool which can be used for editing JPEG comments is XnViewMP. Originially written for Mac, binaries are now available for major linux distributions.

    The linux commands “wrjpgcom” and “rdjpgcom” (provided by “libjpeg-progs” package) can be used for reading and writing comments to JPEG files as well. Other command line based tools that can be used are ExifTool by Phil Harvey (exiftool) and Exif Jpeg header manipulation tool (jhead).