Skip to content

Instantly share code, notes, and snippets.

View meain's full-sized avatar

Abin Simon meain

View GitHub Profile
@meain
meain / pre-commit
Last active November 22, 2021 05:18
Check for curse words ( used as git pre-commit hook )
# to use this use
# mv pre-commit .git/hooks/pre-commit
# chmod +x .git/hooks/pre-commit
function check_sanity(){
git diff | grep -i 'fuck\|shit\|crap\|dammit\|bitch\|asshole\|shithead'|wc -m
}
function print_insanity(){
git diff | grep -i 'fuck\|shit\|crap\|dammit\|bitch\|asshole\|shithead'
}
@meain
meain / whatasppSpam.js
Last active June 9, 2017 17:15
Whatsapp web spam script
// for send function to select input
function dispatch(target, eventType, char) {
var evt = document.createEvent("TextEvent");
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US");
target.focus();
target.dispatchEvent(evt);
}
// enters input and clicks button
function send(msg){