This file contains 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 getRandomCharsFromString = (charset, length) => | |
charset.split('') | |
.sort(() => Math.random() - 0.5) | |
.slice(0, length) | |
.join('') | |
export const generateRandomPassword = () => ( | |
[ | |
getRandomCharsFromString('0123456789', 4), | |
getRandomCharsFromString('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 6), |
This file contains 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
if [[ "$SSH_AUTH_SOCK" = "" ]]; then | |
# first round add the ssh agent | |
exec ssh-agent bash | |
else | |
# here you can add your ssh keys | |
# github as an example | |
ssh-add ~/.ssh/github_com_rsa | |
fi |
This file contains 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
/** | |
* Load font-faces with no pain, that follow a named directory pattern | |
* GoogleFonts does so | |
* --- | |
* @params {String} $name - the name of the font | |
* @params {String} $path - font directory path | |
* @params {Map<String>} $types - the font-types you want to load ("Thin", "ThinItalic", "Light", "LightItalic", "Regular", "Italic", "Medium", "MediumItalic", "Bold", "BoldItalic", "ExtraBold", "ExtraBoldItalic", "Black", "BlackItalic") | |
* @returns {void} | |
* --- | |
* @licence MIT |