1. ES6 .includes()
:
var S = "fullweb";
S.includes("web");
2. RegExp .search()
:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
{ | |
"AP":[ | |
"Adilabad", | |
"Anantapur", | |
"Chittoor", | |
"Kakinada", | |
"Guntur", | |
"Hyderabad", | |
"Karimnagar", | |
"Khammam", |
{ | |
"AP":"Andhra Pradesh", | |
"AR":"Arunachal Pradesh", | |
"AS":"Assam", | |
"BR":"Bihar", | |
"CG":"Chhattisgarh", | |
"Chandigarh":"Chandigarh", | |
"DN":"Dadra and Nagar Haveli", | |
"DD":"Daman and Diu", | |
"DL":"Delhi", |
Table of Contents generated with DocToc
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
//8 Methods to Iterate through Array | |
//forEach (Do Operation for Each Item in the Array) | |
[1,2,3].forEach(function(item,index) { | |
console.log('item:',item,'index:',index); | |
}); | |
//map (Translate/Map all Elements in an Array to Another Set of Values.) | |
const oneArray = [1,2,3]; | |
const doubledArray = oneArray.map(function(item) { |
var translate = (function () { | |
var symbols = { | |
a: '([]+![])[+!+[]]', | |
b: '([]+{})[+!+[]+!+[]]', | |
c: '([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
d: '([]+[][+[]])[+!+[]+!+[]]', | |
e: '([]+[][+[]])[+!+[]+!+[]+!+[]]', | |
f: '([]+[][+[]])[+!+[]+!+[]+!+[]+!+[]]', | |
g: '([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+!![])[+!+[]]])[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
h: '(+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]] |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)