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

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

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

regex

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

gitstash

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

gitbranching

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

gitbasics

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

installremove

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

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 »

for…of

for...of

for-of is a new loop in ES6 that replaces both for-in and forEach() and supports the new iteration protocol. Use it to loop over iterable objects (Arrays, strings, Maps, Sets, etc.; see Chap. “Iterables and iterators”) Syntax for…

Read More »