Author: admin

Ninja secret of javascript array

power of array

Primitive variable just store one value. Lot of time it’s vary difficult to manage multiple variable so avoid this problem we need storage to store multiple element inside one variable. So basically array is an ordered series or…

Read More »

Basic use of pipe and grep command

pipe and grep

Pipe and grep is a very powerful tool of linux command line. So before we start Basic use of pipe and grep command we need to understand what is pipe and grep and how to use both tool….

Read More »

Power of javascript closure


It is a advance concept of javascript. This is really interesting concept in javascript. So basically it is a function inside function which can access outer function properties. According to MDN “A closure is the combination of a…

Read More »

Javascript ninja secrets


It’s all about js cool tips and tricks which help day to day programming and reduce the time of developer. For more tricks you can also read Tips and Tricks. 1. Use == instead of === == only…

Read More »

Regular expressions


It is a powerful way of searching and replacing something inside a string. To implement that we can use RegExp class and integrated with strings. In Regular expressions we need pattern and optional flags. So we have 2…

Read More »

Git stash


you can save your current working dir into a temp storage. Do this: # save working dir (all uncommitted changes) in a temp storage git stash save after you do this, the working tree will be clean. to…

Read More »

Git branching


How to list branches? git branch #show all local branches. git branch -r #show all remote branches. git branch -a #show all local and remote branches. git show-branch #show branches and their commits. How to find out which…

Read More »

Git basics


Git Basics Set Up Name and Email Info First, you need to setup a default name and email. Else, git won’t let you commit. Everytime you commit, your user name and email is in part of the commit…

Read More »

Install/remove Linux Packages


Install <pre> sudo apt-get install name // install a package. </pre> Remove <pre> sudo apt-get remove name // un-install package. sudo apt-get purge name // remove a package and its config files. </pre> Search <pre> apt-cache search name…

Read More »

The box model


An imaginary diagram that outlines each DOM element: So formula for width Total calculated box width = content width + padding width + border width .width { border: 4px solid #fff; padding-left: 8px; padding-right: 4px; width: 100px; }…

Read More »