Mongoose vs mongodb native driver – what to prefer?

Mongoose or mongodb native driver, which one to use? This is one of the initial queries for a node-mongo developer; and probably one of the most important ones. Because one use Object Rational Mapping (ORM) and another Object Document Mapping (ODM); so chainging the driver later on in your project can immensly increase your work.

Read More…

Slide or drag any jQuery/bootstrap slider programatically

This article provides a hack to slide or drag any kind of slider or dragabble element (which is dependent on jQuery) programatically. This code snippet is going to be a normal jQuery code which will manipulate the position of the element itself. Code snippet: Explaining the code Firstly, we are creating a mousemove event explicitly.

Read More…

Customize MAC terminal to look colorful like ubuntu

The default MAC terminal looks very lame, doesn’t matter which theme you are using. As a developer you need visibility in the terminal; thus, things should be colorful like ubuntu. This article gives you proper solution for that without installing any custom theme. The article contains the following: A readymade snippet to change the terminal

Read More…

Explaining few strange behavior of setTimeout() with code snippet

Previously also we showed you few tricky behavior of JavaScript codes. Today also few more strange things you are going to observe. The following code snippets which describes JavaScript event loop will not only help you to improve your JS knowledge, but also can be useful for you to write logic. Snippet 1: Guess the

Read More…

Polymer tutorial: Scafolding and making the first app with polymer js

In part 0 of Polymer tutorial, we’ve discussed what Polymer and web components are and why do we need polyfills. In this article we will see how to make the boilerplate for a polymer app. And how we can develop a basic app using Polymer. Setting up Polymer Polymer has few dipendencies (as web components

Read More…

Describing Polymer Js in brief with web components and polyfills

Polymer, polyfills, web components, you may have already come across these terms as you’ve started digging about Polymer Js. In this article I will try to cover what polymer exactly is, what is the team Polymer’s agenda, what are web components and why we need polyfills. People say Polymer is a JavaScript library; but in

Read More…

Smartjax.js: a jQuery plugin to make your ajax calls smarter

Smartjax stores your api responses and do not ping the server in the same ajax call for the second time. Eg: you display your logged in user’s summery in the right top cornor of your site. But to display that in every page you either need to make an ajax call, or have to make

Read More…

Setup a Node server using express to host your files – Best practice

Node provides very low level api; thus it is very difficult to host your static files using only node. There are several Node modules which do this work, like node-static, paperboy and http-server. Today we are gonna show you how to to setup a complete Node server using the most popular module of Node, that

Read More…