Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Antonio Cucciniello acucciniello

🎯
Focusing
View GitHub Profile
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active Jul 9, 2021
Remove node_modules from git repo
View gist:0052fab554b14bbfa3ef
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@kerimdzhanov
kerimdzhanov / random.js
Last active Jul 1, 2021
JavaScript: get a random number from a specific range
View random.js
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}