This file contains hidden or 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 | |
# 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 |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [ "$1" != "add" ] && [ "$1" != "remove" ] || [ -z "$2" ]; then | |
[ -z "$2" ] && echo "Missing hostname" || echo "Unknown option '$1'" | |
echo "Unknown option '$1'" | |
echo "Usage:" | |
echo " $0 add <hostname>" | |
echo " $0 remove <hostname>" | |
exit 1 | |
fi |
This file contains hidden or 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
# | |
# Arch Linux / Fedora sudoers entries | |
# | |
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL | |
# Allow passwordless startup of Vagrant with vagrant-hostsupdater. | |
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts | |
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts | |
%wheel ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE |