The easiest way to integrate Social Login in your React Apps ...Checkout NPM

Sunday, January 10, 2016

Bulk Unfollow on Twitter for Spam Accounts

Likely, you would have been shocked like me when you logged into your Twitter account only to see that you've been following hundreds of account. Following is step-by-step to get rid of this in 5 minutes.

Most Important
Reset Your Password First

1. Using Chrome, login into Twitter account and click Following
= This will list all accounts you've been following.
2. Scroll down until Twitter stops loading any more Twitter Accounts
3. Press F12 to open developer tools and select Console Tab
4. Enter following in console window and hit Enter
5. It will take some time. Once you see undefined, refresh your screen.

var x = 1;

Replace 500 with Total Accounts You're Following - Count of your valid accounts since begininng.


Monday, September 14, 2015

Ionic Modal Not opening on Device

Recently I was trying to build a simple app that would list the tasks and allow adding one task via an ionic modal. While every thing work fine on emulator and browser, upon deploying the app on device, modal didn't work. I was sure that ionic is working fine as ng-repeat was able to run and display tasks.

After I ran android with logging option, I came across warning that 

The moment I fixed it, Modal started working on device. I fixed it by adding following meta tag on the index.html page.

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">


Monday, August 3, 2015

Visual Studio 2015 Community direct iso link

You may download Visual Studio 2015  Community Version directly from

Thursday, July 2, 2015

LocalStorage v/s SessionStorage v/s Cookie

Comparison of different options to save data locally on browser

Local Storage
SqlLite DB
Not checked yet
Session Storage
Cookie (No expiration set)
Domain (no expiry)

Domain and window
Domain and expiry
Max Payload Size (per domain)
IE10 - 4.7MB

IE10 - 4.7MB
Available across tabs (same domain)?

Available on Page Refresh?

Across windows (same domain)

New Incognito Window (same domain)

Available on close/open same browser?

No (if no expiry)
Goes to server on every request?

Compatible on mobile browser?

iOS, Android - Yes
Windows - Max 20
BB - Per user
Browser compatibility
Most modern browsers

Most modern browsers
Almost all support
Accessible across site?

Can expiry be set?
No. Doesn't expire auto

No. Auto expire on window close

Wednesday, July 1, 2015

The 'ffi' native gem requires installed build tools

For Windows people who've never had experience with Ruby, Gems etc.

Recently on a windows box, I had a need to install compass fresh. Not because I wanted to create a gem but just to use features like sass etc. I did following steps:

1. Installed Ruby from
2. checked version
C:\ruby --version
which returned
ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]
indicating successful ruby installation
3. executed gem update --system so that all gems are up-to-date
4. gem install -compass  it failed with following error:
C:\Users\deepak.aggarwal>gem install compass
ERROR:  Error installing compass:
        The 'ffi' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from '' and follow the instructions
at ''

After re-installing many times and then installing devkit from download page (which initself is a big list of task) I realized I didn't need any of that....

All I had to do execute in command prompt was:
gem install ffi

And then gem install compass worked fine

1. You'll also see similar error if you already have a component installed. Always execute following command to double check that the component you're trying is not already there
gem list --local
2. You don't need to install or do anything with devkit (unless you want to create native gems)
3. Following is my result of listing.. You can compare missing ones and install everything as-is by explicitly specifying versions
bigdecimal (1.2.6)
chunky_png (1.3.4)
compass (1.0.3)
compass-core (1.0.3)
compass-import-once (1.0.5)
ffi (1.9.8 x64-mingw32)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
multi_json (1.11.1)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
rdoc (4.2.0)
rubygems-update (2.4.8)
sass (3.4.13)
test-unit (3.0.8)
toolkit (2.9.0)
You do so by using v switch. Like
gem install compass -v 1.0.3

Big thanks to my colleague Gaurav Mehra whose installed gems I referred to find that ffi culprit

Sunday, June 28, 2015

Downloading PDF from

I tried to download PDF from but the download button did nothing. I signed up and logged in, but still nothing happened on pressing Download.

Finally I find a hack ;)

1. Instead of pressing download, check the tool box
2. Select Print
3. Print opens a new window with PDF
4. Opt for Save WebPage from Browser. This will save the file on your disk (but without pdf extension)
5. Rename the file on disk by adding .pdf suffix.
You've the PDF on disk!

Wednesday, March 25, 2015

CryptographicException - Key not valid for use in specified state

Recently, I was caught with frustrating exception
"CryptographicException “Key not valid for use in specified state.” while attempting to generate pass using passbook generator using C#. The fix for me was to install the certificate NOT by installing the certificate by opening the cert installer but instead installing it from the MMC console.

1. Open MMC
2. If you don't see certificates, in Files selectAdd remove snap In
2a. Select Certificate options and add it to right followed by your certificates needs
3. Once you have the certificate snap-in and opt for Import from context menu, locate your pfx or pk12 and complete wizard.

Ensure to select "Mark this key as exportable" in wizard step where you punch in password

Saturday, July 19, 2014

Setting Deployd and Nodejs for Apress professional angularjs

If you're reading Professional Angular Apress book (One of the best books I've read), for practical exercises you'd need to make some installations. Unfortunately, the book text is a little outdated as far as installation is considered. I'm just summarizing steps (that worked for me on Windows box).

1. Install NodeJS
This is simple. Download and install NodeJS from

If you just want to test if Node is properly installed:
a. open command prompt
b. type node and enter
c. Type  following and enter
    function testNode() {return "Node is working"}; testNode();

If "Node is working" dispays, its working fine.

2. Using Nodejs as web server
Here you would run a little out of luck by following steps as are defined in book.
2.1. Install Connect NodeJs plugin
This is same as in book.
a. Open command prompt and navigate to folder where NodeJs is installed (in my case C:\Program Files\nodejs)
b. type npm install connect and enter

2.2 Install ServeStatic NodeJs plugin
Within the same folder as above in a , type npm install serve-static and enter

2.3 Server.js file
Instead of text in book, use following:

var connect = require('connect'),
    serveStatic = require('serve-static');
var app = connect();

Note: If you want to specify a specific path, ensure to escape slashes. for example:

2.4 Validating
a. open command prompt and run node server.js
b. open browser and type http://localhost:5000/test.html

The above code assumes that you've created a folder "angularjs" at the same level as Nodejs (not inside NodeJs folder). If you've created it inside you'd need to remove ../ otherwise NodeJs will give error
Cannot Get /test.html. Also it assumes that there is a test.html file.

3. Installing Deployd
If you go to and try to download installer (which is in Google Drive), you'd see following message:
Sorry, this file is infected with a virus
Only the owner is allowed to download infected files.

The file is actually not infected. To get deployd, you've 2 options:
a. Download the sourcecode of book from which contains a copy of installer
b. Other way is to fool Google Drive by:
- From file menu, choose Move to Folder  and move it to your own G drive
- It will still show the owner as Jeffery Cross in your drive. Right Click the file name and select Make a copy  from context menu.
Now the file will be copied into your drive with your name in owner. You can download it then.

4. Creating Sportsstore
I'm not sure if MongoDb is a pre-requisite or deployd installer has all what's needed. But I was getting some error upon trying to run sportsstore for which :
a. I downloaded and installed MongoDb from
b. Give full access to yourself (everyone is even better) to the folder that will have sportsstore (if you're following book, thie would be the deployd folder created by yourself). I was getting
{error 'EACESS', syscall:listen} otherwise.

Finally, to launch create and launch your sportsstore
a. open command prompt and navigate to folder you created in 4.
b. run dpd create sportsstore
c. run cd sportsstore
d. run dpd

voila! Your page will open in browser.
You'are all set to try practical chapters.