A fresh start of Life

My life was very smooth & happy a year back and within a year i had lost everything i had. Love, money, inspiration, self image and everything i had. I made terrible mistakes, even try hard to fix some of things & lost in black hole of my thoughts. Now i left with nothing. Yesterday i was sitting in my house holding my head full of pain. For a time being it feels like i got so much burden on my head and no string is left to pull off now. Honestly speaking, i even got life ending thoughts.   …

Continue Reading

Given a talk about Advanced Git at Directi

Git is a awesome Version Control System for tracking changes in files and coordinating work  on those file with multiple people. Most of  developer use git every day to save work and collaborate with other team member. For open source projects, i use Github while for private Repository Gitlab because it’s free. Github also have private Repositories but they are not free, you have to pay monthly charges for it. But yes in Github monthly subscription, they also provide lot of additional features. This article is about my presentation talk about Advanced Git at Directi,   Presntation Link : https://www.slideshare.net/odinagupta/advanted-git   …

Continue Reading

How to move uncommitted changes between branches in Git

While working with feature branch workflow, it’s may happen sometime that you made changes in main branch but you wanted to develop that feature in separate branch. You haven’t committed the changes yet and suddenly you realized that these changes should be on new branch or that particular branch. Git provide a feature which can save your day. We call git stashing,  it allows you to move uncommitted changes between branches. This feature is build to save your uncommitted changes work before making a urgent quick fix in the project. Best thing about this feature is that it save changes …

Continue Reading

How to update node on mac

I was reading some documentation and i got to know that i need to upgrade my node version. you can check your current node js version by typing this.

Here is the quick way to update node JS version.  First of all just update your Homebrew package manager.

After Homebrew got updated. Now you can update your node js version.

After it updated. Try checking your updating node version.


Continue Reading

Hash vs chunkhash vs ContentHash

From last some days, i was thinking of writing this blog but got too busy with other things. Tonight i get some time on writing on this topic. This particular blog post i have not published here, This is actually published on medium.com. You can read full blog post by clicking here.   I also had written webpack 1 to webpack 2 migration blog post which you can read by clicking the link.   It’s too late tonight, almost morning now. I should take some nap now.    

Continue Reading

Migration to webpack-2

Recently i have done webpack migration for our React redux project to Webpack 2. There are lot of syntax changes was there (Which i will explain below) that needs to be made. Also webpack also provides features like Tree shaking, Caching, dynamic imports etc which leads to change in compilation time and bundle sizes. Let me give little overview of what all major syntax changes for migration and than we will discuss various feature to improve webpack bundling process. 1. Module.loaders changed to module.rules: In webpack 1, modules.loaders got changed to module.rules, loaders names array is changed to use.         …

Continue Reading

center text in SVG shapes

Whenever you place text inside any SVG shape (rectangle, ellipse, circle etc), you would like to center text in SVG shape. In HTML placing a text relative to parent can be easily done using “text-align: center” property, similarly you can place text center of SVG shape with help of “text-anchor: middle”.  For SVG, it is not that straight forward but i will explain below, how you can achieve it. Let’s first of all create an svg tag as follow:

Now lets add a <g> tag inside svg to group multiple tag inside.

Now let’s add a circle and text tag inside <g> tag. …

Continue Reading

How to rename a git branch

Git branching is very essential feature when you are working in a team and different team member are handling different features. There are some instances when you might have to rename branch  like   When got a better branch name that you already assigned…..ha ha!!!. Your manager wants that feature to reinvent with new strategy. Some other reasons of yours. If you want to rename a branch while you are on any other branch.

If you want to rename the current branch, you are on.

In case of any query, comment below.   Also Read: How do I …

Continue Reading

New ES6 Features

ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. Implementation of these features in major JavaScript engines is underway now. See the ES6 standard for full specification of the ECMAScript 6 language.   ES6 includes the following new features: Arrow Function Classes Destructuring Constant and let Arrow Function: Arrow functions are a new ES6 syntax for writing JavaScript Functions. They will save developers time and simplify function scope. ES6 fat arrow functions have a shorter syntax compared to function expressions and lexically bind to this value. Arrow Function Syntax:

JavaScript function can be written in two ways …

Continue Reading