Thursday, December 5, 2019

Problem with github: permission denied to your own repo?

 I had this problem too but managed to solve it, the error is that ur computer has saved a git username and password so if you shift to another account the error 403 will appear. Below is the solution

For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next -> remove the Github keys.

Monday, August 12, 2019

How to replace all the entries in a string in Javascript? like replaceAll?

This should do the trick by adding a new method (replaceAll) to the String prototype.

String.prototype.replaceAll = function(search, replacement){
            return this.replace(new RegExp(search, 'g'), replacement);
        };