Moving From Hostgator To Digital Ocean

HG to DOI recently moved from Hostgator to Digital Ocean and this how/why I did it.
This is something I have been wanting to do for quite sometime. I tried a couple of years back to shift to a VPS but reverted to a managed host because VPS was expensive and it was time consuming.
With the likes of Digital Ocean, Linode and the grand old Amazon AWS offering more and better (read easier) options now, I decided to make the jump, yet again.
Also, I should mention that there is nothing specifically wrong with Hostgator. They have good hosting services with excellent customer service. But I was about hit the limits of their shared hosting and their VPS offerings are quite expensive.
So here is what I needed :

  1. Run a personal website plus a few test websites.
  2. Run an email server that will take care of my personal email
  3. Have some kind of a personal data backup system 
  4. Run experiments (Twitter client, scraping data, RSS aggregator etc)

Why Digital Ocean?
Two simple reasons :

  1. Their extensive documentation. For someone like me who doesn’t have a lot of experience of dealing with Ubuntu servers, their guides are quite helpful. They are not 100% complete but it is a GREAT starting point.
  2. Easy to use – You can create and deply a droplet with the OS (along with different stacks if you want) within seconds.

What Did I do ?
First off, I experimented with some flavours of Linux (Ubuntu/CentOS), a range of Control Panels (Ajenti/Zpanel/ISPConfig/Centos’ Control Panel) and some server monitoring tools like Cacti.¬†
The $10 free credit from Digital Ocean was put to full use. I deployed, destroyed and delpoyed again, more than a dozen times, before settling for the following. 

  1. Ubuntu 14.04 with the AMP Stack
  2. Webmin (with Virtualmin) for Control Panel (This best suited my needs, though I liked Ajenti too)
  3. Postfix/Dovecot Email set up
  4. Periodical backups (of the websites and email) to Amazon S3
  5. Cloudflare  for DNS
  6. Server monitoring using New Relic (experimental – I am not sure if I actually need this but subscribed to a free account)

What’s next?
I am hearing that apache isn’t ideal and I should shift to Nginix. But for now I am sticking to this before I learn more about Nginx.¬†
I’ve also been reading about how a control panel is another level of complexity and I should stick to the command line. But this is sometime away. Right now the Control Panel lets me enable/disable services easily. So will use it for sometime.
To be continued…. Next up – How Did I Set Up The Server, the Control Panel, Move The Data, Set up Back ups and set up the monitoring.

Why I think Delhi is headed for a hung assembly…

Delhi elections are just around the corner. Election analysis reports are beginning to surface along with pre-poll predictions. All the three pre-poll surveys conducted for Delhi 2013 elections predict a different outcome. So I thought of digging the data from the past elections and see what they suggest.

Looks like the Congress is slowly losing its vote share while BJP is gradually gaining. In the last 15 years, Congress’ share has dipped to 40% from 47%, where as BJP has increased its share from 33% to 36% This is pretty clear from the Total Votes’ Share (No of votes as a percentage of total eligible voters) and the Polled Votes’ Share (No of votes as a percentage of the total votes polled).

Total Votes

Similar is the case with the total number of seats won by Congress and BJP. The seat share, however, is not as close a contest as the vote share is.


With Aam Aadmi Party (AAP) jumping into elections, the scenario has become even more interesting. AAP is expected to cut into the vote shares of both BJP and Congress though we don’t know who is going to lose how much.

My prediction is Delhi is headed for a hung assembly with advantage to BJP. I might be totally wrong and this isn’t a scientific predition. It is part based on projecting the past analysis for this year and the other part is based on assumptions. We will know the final verdict on Dec 8, 2013.

15th Lok Sabha – Story So Far

Infographic on how the 15th Lok Sabha has worked so far.
There has been a lot of news about how ineffective the 15th Lok Sabha has been in its functioning, more so when compared to the Rajya Sabha. I pulled out some of the data published across various websites like the Data Porta, The Hindu, PRS Research etc and compiled them into a simple infographic. This is my first attempt at making an infographic like this and all comments are appreciated.

Twitter Share Link Creator

A share link creator is an ubiquitous tool, especially for those working in digital marketing.
There are a couple of websites that have scripts that help generate these links. A google search will throw a bunch of websites that help you generate such links and the one I like the most is (largely for its simplicity). However, there is a problem with these websites.
They don’t generate the perfect tweet you want, one that includes the text, a hashtag and an URL. Most these services don’t generate a tweet link with a hashtag and the ones that support hashtags don’t append the URL.
So, I decided dig this a bit more to figure out the best way to generate the twitter share links, that can support hashtags and URLs as well.
The solution I found was very simple. The best way is to construct the URL yourself.
Below is the structure

A sample tweet would be
text=How to generate a twitter share url with
hashtags=hashtag,twitter,social media

The final URL will look like to generate a twitter share url with hashtags?&hashtags=twitter,socialmedia,hashtags
To make tracking easier, you can use bitly. The short link of the above long url would be something like
However, this method isn’t 100% perfect either. Some challenges I identified in this include

  • You cannot alter the structure of the tweet. It remains text, url, hashtags
  • You cannot insert hashtags in the text
  • If you add special characters in the text it doesn’t work. Just ‘?’ works.
  • You have to stick to the syntax. Things like spaces, a extra ‘/’ at the end of the URL etc will result in a wrong URL or a truncated tweet.

Lemme know if this works and if you have more ideas to generate better share links for twitter.
PS: The share URL makes use of the Twitter web intent. In addition to the URL and hashtags, it supports a couple of other parameters too. Read more here