Skip to content

Instantly share code, notes, and snippets.

View mxvsh's full-sized avatar
⚒️
Crafting web apps

Monawwar Abdullah mxvsh

⚒️
Crafting web apps
View GitHub Profile
@mxvsh
mxvsh / gist:aaff036c47e302e0200e6977f10bf8f6
Created September 21, 2021 01:54 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then