Shuffle an array in javascript

This code snippet can be use to Shuffle an array in JavaScript.

working example :

How To Install Redis in Ubuntu

What is Redis?

Redis is a flexible, open-source, key value data store. Following in the footsteps of other NoSQL databases, such as Cassandra, CouchDB, and MongoDB, Redis allows the user to store vast amounts of data without the limits of a relational database. Additionally, it has also been compared to memcache and can be used, with its basic elements as a cache with persistence.

Set-up Environment For Installation.

Before installing redis, there are a couple of prerequisites that need to be downloaded in-order to proceed with the installation.

1. Update all of the apt-get packages.

2. Download a compiler with build essential in-order to install Redis from source.

 3. Download and install tcl8.5

Install Redis

After all of the prerequisites and dependencies downloaded to the server, you can proceed with the Redis installation from source.

1. Download the Stable Redis release from their website. google code. The latest stable version is 2.8.3 Continue reading How To Install Redis in Ubuntu

How to uninstall Redis server from Ubuntu

Today I came across with a bit of a problem while trying to remove Redis 2.6 from one of my servers. The problem was, when I was installing at the first time I used make install  (Source build) instead of apt-get install (from repository). Since the make file didn’t had a un-install option, I had to remove it manually. In this post I will guide you through both uninstallation methods, You can chose the suitable method depending on how you installed it.

If you use apt-get

You can simply type below command in your terminal. This will remove the redis-server package and any other dependant packages which are no longer needed (Because of --auto-remove). And also it will delete your local/config files for redis-server (Because of purge).


If you used makefile

This is where it gets bit tricky. Because you will have to manually remove installed files. Here is how to do it; Continue reading How to uninstall Redis server from Ubuntu

PubNub Spout for Storm

What is PubNub?

PubNub is a real-time messaging platform which uses publisher / subscriber pattern. You can find out more about PubNub by visiting

What is Storm?

Storm is a free and open source distributed realtime computation system. Storm can be used in scenarios like: realtime analytics, online machine learning, continuous computation, distributed RPC, ETL, and more. To learn more about Storm project, visit Storm Project website

PubNub Spout for Storm

Once you get familiar with Storm, you would know that Storm uses a concept called Spouts. A Spout is a source of streams in a Storm topology.   Basically Spout is the one who will read tuples from the external source and emit them in to the Storm topology. Please refer to Storm Wiki to read more about the concept of Spout.

In this post it will show how to use PubNub as the real-time external data source for a Storm topology, by making a PubNub Spout. Continue reading PubNub Spout for Storm