Skip to content

Instantly share code, notes, and snippets.

View maxmarinich's full-sized avatar
🎯
Focusing

maxmarinich maxmarinich

🎯
Focusing
View GitHub Profile
@maxmarinich
maxmarinich / consoleColors.js
Created February 19, 2022 16:17 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
@maxmarinich
maxmarinich / pre-commit-eslint
Last active March 19, 2018 07:38 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
# chmod +x .git/hooks/pre-commit
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true