Skip to content

Instantly share code, notes, and snippets.

View tauil's full-sized avatar
🛠️
I love building and customising things. From software to hardware.

Rafael Borgonovi Tauil tauil

🛠️
I love building and customising things. From software to hardware.
View GitHub Profile
@tauil
tauil / no_prying_when_commiting.sh
Last active September 2, 2016 02:23 — forked from dodecaphonic/no_prying_when_commiting.sh
No Pry when commiting
#!/bin/sh
for FILE in `git diff-index --name-status HEAD -- | awk '{print $2}'`; do
if [ "echo $FILE | grep .rb" ]; then
if [ "grep 'binding.pry|debugger' $FILE" ]; then
echo "$FILE: pry or debugger call. Fix it before committing."
exit 1
fi
fi
done
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {