This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Soit: | |
git rm --cached filename | |
Soit: | |
git update-index --assume-unchanged [path] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"country-code": 4, | |
"alpha-2": "AF", | |
"alpha-3": "AFG", | |
"country-fr": "Afghanistan", | |
"country-en": "Afghanistan" | |
}, | |
{ | |
"country-code": 8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"code": "af", | |
"name": "Afrique" | |
}, | |
{ | |
"code": "sq", | |
"name": "Albanie" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const randId = () => Math.random().toString(36).substr(2, 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watchman watch-del-all && rm -rf node_modules/ && npm install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use '/' to enclose regular expressions or use new RegExp('') | |
Méthode test() renvoie un booléen indiquant si la chaine de caractères contient au moins un match du regex testé | |
/cat/.test('the cat says meow'); -> true | |
/cat/.test('the dog says meow'); -> false | |
Un ensemble de symboles pour un ensemble d'instructions: | |
. => match le caractère indiqué, vaut 1 occurence | |
* => match le caractère indiqué, vaut de 0 à illimité occurences | |
+ => match le caractère indiqué, vaut de 1 à illimité occurences |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy = JSON.parse(JSON.stringify(object)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isPrime(num) { | |
let prime = true; | |
for(let i = 2; i < num; i += 1) { | |
if (num % i === 0) { | |
prime = false; | |
} | |
} | |
return (num < 2) ? false : prime; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!isNaN(parseFloat(v)) && isFinite(v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pgcd = (a,b) => ((a%=b) == 0) ? b : pgcd(b,a); |