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
/** | |
CSS Selectors Count | |
Count the total number of CSS selectors and provide grand total. | |
To be run on DevTools console. | |
From https://stackoverflow.com/a/12313690/1310132 | |
*/ | |
var | |
styleSheets = document.styleSheets, | |
totalStyleSheets = styleSheets.length, |
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
#!/bin/sh | |
# | |
# Pre-commit hook for linting staged javascript files with ESLint | |
# From https://gist.github.com/rashtay/328da46a99a9d7c746636df1cf769675 | |
# | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$\|.vue$") | |
ESLINT="node_modules/.bin/eslint" | |
printf "\nPre-commit hook: ESLint javascript validation\n" |
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
/** | |
LoadTimes | |
Simple function to calculate the various load times available in window.chrome.loadTimes(). | |
Rounds values as milliseconds, relatives to "startLoadTime". | |
Result is stored on clipboard. | |
*/ | |
console.info("LoadTimes"); |