Get Lazy in Javascript

Lazy ways of coding in javascript. Array Creation Normal way var a = new Array(); Lazy way var a = []; String to Number Conversion Normal way var num = parseInt('100'); Lazy way var num = '100'*1; Number to String Conversion Normal way var str = 100.toString(); Lazy way var str = '' +100…

Nodejs Redis Client

Lets us first install the nodejs Redis Client by the following command $ npm install redis Before that you need to install the Redis Server as mentioned in the earlier post. Now lets create redis.js client file to interact with redis server. var redis = require('redis'); //creating redis client var…

Redis as a Background Daemon

For installing Redis on ubuntu, refer my other post . To run Redis as a Background Daemon, there is a script provided by Redis itself. Navigate to the utils folder where redis has been installed. There will be a script called install_server.sh. To run redis as a background daemon…

Website Extractor for Linux

Hey, there are many website ripper or website copier in Windows operation system for offline browsing whereas in linux we dont have anything similar to it. No worries, we have got wget. wget is more powerful to extract the contents of the website and use it for offline browsing in…

Funny Javascript

We all know that English is a funny language but our Javascript is too. Here are the proof for it. Open the terminal and execute node to get into REPL of Node.js $ node Now we are into REPL mode of Node.js, lets play with javascript to see how…

Install Node.js

Node.js is a platform built on Chrome‚Äôs JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Installing Node.js from source To install…

Install Redis in Ubuntu 12.04

Redis is an open source, networked,in-memory, key-value data store with optional durability. Let us try install redis in ubuntu 12.04. Downloading Redis Download redis by executing the following command $ wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz Installing Redis To install redis, execute the following…

Install Oracle Java in Ubuntu 12.04

Oracle Java is removed from the official software repositories of Ubuntu as it is closed source. Ubuntu 12.04 is shipped with Open Source OpenJDK6 and the IcedTea plugin, which is more adequate for many developers. OpenJDK6 is available in the Ubuntu repositories and receives security updates. However, still some…