Heroku is a really cool service.It lets me snip up servers in a matter of minutes rather than hours.But Heroku has a dark side, as a developer heroku provides you a free instance which should be sufficient for your regular testing and development process.But as soon as you want to launch your application, you will get deterred by the amount of money you will be paying per month

Starting from my last project I have been trying to move away from heroku and build the features that heroku offers.The process would look something like this.

  1. Automatic deployment and running of Tasks (Done)(Thanks to capistrano)
  2. Auto Scaling of website based on CPU usage.
  3. Deployment of code once the test pass.

1.Automatic deployment and running of Tasks

Capistrano plays a huge role in the this step,I was able to deploy the code from my machine without even touching the server.No more ssh and managing different deployment version.

2.AutoScaling of website

This is probably the most difficult part of the whole setup.AutoScaling in the cloud world is very dependent on the service provider you chose.Microsoft Azure , Amazon AWS and DigitalOcean all have a different way to launch and provision website.Currently I have got the server provisioning working but integrating the code deployment and load balancer is still very tedious.

3.Deployment of code once the test pass

This step of the process will also rely on a tool which is mostly gonna be jenkins.Jenkins is very popular and it has huge community of existing plugins which I can make use of.


Last week i got the Xiaomi Mi Band.It a basic fitness tracker, It monitors the number of steps you travel and your sleep pattern.Ever since I got the device I have it on my arm.

FullSizeRender 3

The good parts:

The battery life on this device is just amazing.Even after a full week of active usage, the battery has just drained from 100% to 85%.Thats just 15% drain per week.If the drainage remains the same, the device should stay charged for another 5 weeks.Thats really impressive, 6 weeks of battery life.



Looking at the manufacturers website they claim the device will run for 30 days on standby charge.This is really important as they are unpromising and over-delivering.Something a lot of other companies lack(Yes I am talking about you samsung).


What makes the deal even sweeter is that the device is just for 15$ – 20$ depends on where you buy it from.I bought the device in dubai for 110AED.


Now the bad parts:


The device only tracks your steps,It could have been better if it could track activities and heart-rate.(With a bump in the price ofcourse).The mobile application is not a best compared to other fitness tracking applications.However it syncs to the apple health app, so other applications can make use of the tracked data.Other than the device is great,I even took it under the shower and it doesn’t show any signs of damage.



Today I am write about a gem that I released a couple of days ago.The gem allows you to integrate the clockwork gem with Capistrano.
Capistrano is a really powerful tool to automate deployment and perform tasks during or after the deployment.

Clockwork is the cron job of Ruby world.Compared to the whenever gem (another cron gem) clockwork much more expressive and its looks very rubyish.

I looked around for a a plugin for Capistrano which would help me restart clockwork whenever I would deploy.

Using Capistrano-clockwork is very straightforward, like most the Capistrano plugins,it only supports capistrano 3 and above.
All you have to do it mention Capistrano-clockwork in your gemfile and add ‘capistrano/clockwork’

That’s it.from now onwards whenever you deploy the gem restarts clockwork

If you don’t want the clockwork daemon to restart ,you can disable it by setting clockwork_default_hooks to false

set :clockwork_default_hooks, false

Moreover you can perform other tasks via the following commands:

cap clockwork:start
cap clockwork:restart
cap clockwork:status
cap clockwork:stop

Alfa awus036h is a really wireless usb adapter.It gained its popularity due it cross platform driver compatibility.Moreover the driver allows the device to run in promiscuous mode.This mode allows the wireless NIC to listen to responses in the wireless spectrum even ones that are not destined to it.

Its basically turns the device into a microphone that listens to all the traffic in the air.

So two weeks ago I decided to order one from souq.I received the device within a week.I was really happy to receive the order.The packaging was clean and nothing really stood out.But the minute I opened the box to take a look at the contents, I was shocked.The label behind the alfa card was mispelled.The alfa card mentioned it supported wireless N.This was really weird as the ALFA awus036h doesnt support the wireless n network.Nevertheless I plugged in the device into a linux machine.The device was detected and it tried to connect to one of the networks and asked me for the password.

Even though the device was fake, It seems to work and connect to the network.I then went through the box to find a mini cd which should contain the drivers for the card.I inserted the card into the CD drive and It had a version a of ralink 2080 driver.The original alfa is supposed to have RTL8187L(Realtek).I tried the wireless card for a couple of days and I was facing a lot of issues with the wireless range.

It was not able to detect a lot of the wireless clients in promiscuous mode.This was a huge let down as this was the primary reason for me to buy the device in the first place.



Notice the 8002.11 WTF