Category Archives: web apps

If you’re paying taxes in AY 2015-16 (FY 2014-15) you may want to get a rough estimate before you go to a tax consultant (or do it yourself). For that purpose, you may want to check out this income tax calculator I launched few days ago.

It’s a simple web based tool that helps you get an overview of your total income tax liability (or refund) for the current assessment year. The process is straightforward and simple with step-by-step guide for each sections. (especially for beginners)

First, select your age and financial year (2014-15 is selected by default) and enter your income details in 2nd step. Make sure you add all income sources correctly and also the amount of tax paid in advance (TDS, TCS etc).

Then, you can enter the amounts for eligible deductions before you get to the final report on your tax liability/refund. The deduction page helps you in the process by offering simple and easy to understand interpretation for various sections including section 80C, 80D, 80G, 80E and so. Make sure you read all the details before moving to the next.

Skeleton is a lightweight CSS framework that provides a nice boilerplate to kickstart the development process. I like the minimal design approach. Plus, I can easily add more CSS on the top if required. The grid and some basic styles are more than enough to get started.

Simple Responsive grid

Simple, easy and human friendly grid-naming conventions. Just add a div element with class ‘row’ (with child columns) inside a container and you’re good to go (12 column grid – kind of similar to bootstrap and foundation).

Lightweight, fast and easy to override

The Skeleton along with Normalize CSS is less than 10KB when minified. So, it’s a great choice for smaller web projects, side projects, mobile websites, landing pages for your mobile apps etc.

You can download the latest version from the official website : http://getskeleton.com (Current version : 2.0.4). Sass and LESS versions are also available to help you add Skeleton in your preferred development setup.

Do you often send email to new people and sometimes you’re not sure whether that mailbox actually exists or not ? Then you should use some email verification tool, it will help you avoid wasting time on dealing with invalid email addresses.

It started out as a fun side project just like my other weekend projects (like this port checker tool and another one on creating signatures) but now I’m thinking to add some more features in next release and also launch an API for bulk email verification stuff and so on. (based on some recent feedbacks from the users)

How does it work ?

It involves four simple steps :

First, the regex check where it simply checks the syntax of the email (something@validdomain format).

Next comes the domain validation. If the domain is invalid (doesn’t exist) then there is no point in going any further.

Third step involves extracting MX records from the DNS query result.

In final step, it connects to the SMTP server and tries to simulate sending a message. Most of the servers (e.g gmail) responds with appropriate response depending on whether the mailbox exists or not.

AssembleYourPC is my side project, I started last year (March 2013) when I couldn’t find any PC builder tool for Indian users. It’s a simple tool and you may find it useful while building a custom rig. The component prices are fetched from various sites (online) but it’s quite closer to the actual market price.

Sinatra is a lightweight web development framework (a.k.a micro framework) written in Ruby. It’s a MVC framework (just like Rails) but more suitable for simple and small web projects or APIs (otherwise, you’d probably end up writing too much code, which could be done more easily in Rails, in case of complex web applications).

If you’re new to web development and you’ve just learned ruby then then you should start with sinatra. It’s much easier to learn and you can start creating something (ideally something useful) within hours. Create a simple web app and deploy to Heroku or your VPS using passenger. This article is all about deploying your Sinatra app to VPS.

Why passenger ?

For simple lightweight web applications (sinatra apps), I prefer passenger. You can easily run multiple applications on a single server without any extra configuration (good for small side projects). Later, you can move to unicorn (probably faster response cycle) or puma (lightweight, optimized for concurrency) or something else, if you really need to.

Getting a VPS

Before going through the steps, I assume you’ve already selected a VPS company, if not I would recommend Digital Ocean. (That’s a referral link and you’ll receive $10 credit – worth two months of free hosting) They’ve great plans starting at just $5 per month, well suitable for fun/side projects. For server operating system, select Ubuntu 14.04 LTS, otherwise, you may need to adjust few commands a little, depending on the Linux distribution. For memory and other requirements, 512 MB plan may be enough for a starting out, as you can always upgrade later if required.

Now ssh into the server, and make sure ssh keys are setup as as expected. Additionally, you can turn off password authentication for additional security, type sudo nano /etc/ssh/sshd_config and disable password authentication by changing the value from yes to no. (PasswordAuthentication no)

Note : If you haven’t created any ssh key before (on your local computer), then run ssh-keygen to generate one.

Step 4. Deployment setup

Setting up nginx and passenger is fairly easy. Just make sure the ruby path is setup correctly in your nginx config. Type which ruby to get the ruby version and make sure that’s correctly specified at /etc/nginx/nginx.conf. (just lookout for the lines that says passenger_ruby)

/etc/nginx/nginx.conf file (make sure it looks like this)

passenger_ruby /home/rkjha/.rbenv/shims/ruby;

Server config for nginx/passenger

sudo nano /etc/nginx/sites-available/example.com

Here is a sample config you can use. Replace example.com and username accordingly. (it also creates a 301 redirect for www version of your domain, you can change that if you want).

Now create a symlink for that config and reload the server to apply the new config.

Setting up git/bitbucket Add your project to git (if you’ve not done that already), create an account at bitbucket.org And create a repository (private unless you want the source code of your app to be available open/freely) there. You may need to upload the public key (server), go to repo’s settings and Add Deployment key there.

If you’ve not used git before then check out some free tutorials listed here and comeback later. Deploy using custom rake task You can use some deployment tools like Capistrano (probably overkill for a Sinatra app) or mina (a lightweight deployment tool). But here, I’ll keep things simple and just use a simple rake task to deploy the code.

Step 5. Deploy

You may also need to run bundle install on server, as the rake task is only fetching the latest files from bitbucket repo. Or you can add few lines there (Rakefile) to do that for you. I’ve tried to keep things as simple as possible or I’ll add that later.

If the deployment is successful you can add a DNS entry for your domain. (Make sure you also add an entry for www, so, the www.example.com will be redirected to example.com, without creating any confusion or duplicate issue in Search Engines)