Skip to content

Instantly share code, notes, and snippets.

View SalTor's full-sized avatar

Salvatore Torcivia SalTor

View GitHub Profile
[...document.querySelectorAll('.invite-card')].forEach(card => {
const headline = card.querySelector('.headline').textContent;
const accept = card.querySelector('.bt-invite-accept');
const decline = card.querySelector('.bt-invite-decline');
const name = card.querySelector('.name').textContent;
if(headline.match(/recruit/gi)) {
console.log(`Nah. ${name} looks a little fishy to me. 🚷🚷🚷`);
decline.click();
} else {
@tregoning
tregoning / js-validation-git-pre-commit-hook.sh
Created August 20, 2012 06:20
Git pre-commit hook script that checks Javascript files against jshint
#!/bin/bash -
###############################################################################
# File: js-validation-git-pre-commit-hook.sh
#
# Description: Git pre-commit that checks your code for js errors before you commit it
#
# Prerequisites: jshint to install run: "npm install jshint -g"
#
# Instructions: Place this file in your project's .git/hooks renamed to "pre-commit"
# run: "chmod +x .git/hooks/pre-commit"