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 delay = ms => new Promise(resolve => setTimeout(resolve, ms)) |
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 createArray = count => Array(count).fill().map((x, i) => i) | |
const tenItemArray = createArray(10) | |
console.log(tenItemArray) | |
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] |
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
// cat ~/.gitconfig # Note, this might be ~/.git/config for you | |
[user] | |
email = user@example.com | |
name = Example user | |
[url "git@gitlab.com:"] | |
insteadOf = https://gitlab.com/ |
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
install imagemagick (node) | |
https://www.npmjs.com/package/imagemagick | |
- npm -g install imagemagick | |
- brew install imagemagick | |
// in directory that contains favicon.png, run bash command: | |
convert favicon.png -alpha on -resize 256x256 \ | |
-define icon:auto-resize="256,128,96,64,48,32,16" \ | |
favicon.ico |
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
/** String literal union from Enum */ | |
enum Status { | |
FAILED: 'fail', | |
PENDING: 'pending, | |
SUCCESS: 'success', | |
} | |
type StatusType = `${AccessPassVariant}` | |
// StatusType = 'fail' | 'pending' | 'success' |
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
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
OlderNewer