<commit_before>#!/bin/sh

set -e

DEFAULT_GIT_TEMPLATE="blank"
DEFAULT_SSH_REPO=".ssh"
DEFAULT_DOTFILES_REPO=".dotfiles"

echo "Validating for sudo... "
sudo -v

# https://mths.be/osx
# Keep-alive: update existing `sudo` time stamp until this script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

if [ ! -x "/usr/bin/gcc" ]; then
    echo "xcode tools are NOT installed."
    echo "xcode tool installation is about to be requested."
    echo "Please re-run $0 after xcode tools are installed."
    sudo gcc --version >/dev/null 2>&1
    exit 1
else
    echo "xcode tools are already installed"
fi

WHICH_BREW=`which brew >/dev/null 2>&1`
HAS_NOT_BREW=$?

if [ "$HAS_NOT_BREW" == "1" ]; then
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
    brew update
fi
brew doctor

brew tap caskroom/cask
brew tap caskroom/versions

FORMULAS=( \
    postgresql \
    git \
    brew-cask \
)
for FORMULA in ${FORMULAS[@]}; do
    FORMULA_VERSIONS=$(brew list --versions $FORMULA)
    if [ "$FORMULA_VERSIONS" == "" ]; then
        brew install $FORMULA
    fi
done

brew cask install dropbox
brew cask install google-chrome
brew cask install 1password
brew cask install virtualbox
brew cask install vagrant
brew cask install sublime-text3
brew cask install alfred
brew cask install macdown

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer global require "squizlabs/php_codesniffer=*"
composer global require "fabpot/php-cs-fixer=@stable"
composer global require "lightster/dnsmasq-mgmt=~0.0.2"
<commit_msg>Require changes included in dnsmasq-mgmt v0.0.4<commit_after>#!/bin/sh

set -e

DEFAULT_GIT_TEMPLATE="blank"
DEFAULT_SSH_REPO=".ssh"
DEFAULT_DOTFILES_REPO=".dotfiles"

echo "Validating for sudo... "
sudo -v

# https://mths.be/osx
# Keep-alive: update existing `sudo` time stamp until this script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

if [ ! -x "/usr/bin/gcc" ]; then
    echo "xcode tools are NOT installed."
    echo "xcode tool installation is about to be requested."
    echo "Please re-run $0 after xcode tools are installed."
    sudo gcc --version >/dev/null 2>&1
    exit 1
else
    echo "xcode tools are already installed"
fi

WHICH_BREW=`which brew >/dev/null 2>&1`
HAS_NOT_BREW=$?

if [ "$HAS_NOT_BREW" == "1" ]; then
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
    brew update
fi
brew doctor

brew tap caskroom/cask
brew tap caskroom/versions

FORMULAS=( \
    postgresql \
    git \
    brew-cask \
)
for FORMULA in ${FORMULAS[@]}; do
    FORMULA_VERSIONS=$(brew list --versions $FORMULA)
    if [ "$FORMULA_VERSIONS" == "" ]; then
        brew install $FORMULA
    fi
done

brew cask install dropbox
brew cask install google-chrome
brew cask install 1password
brew cask install virtualbox
brew cask install vagrant
brew cask install sublime-text3
brew cask install alfred
brew cask install macdown

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer global require "squizlabs/php_codesniffer=*"
composer global require "fabpot/php-cs-fixer=@stable"
composer global require "lightster/dnsmasq-mgmt=~0.0.4"

{'fraction_non_alphanumeric': 0.11381381381381381, 'fraction_numerical': 0.010510510510510511, 'mean_word_length': 3.7382645803698433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '309166', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1156, 'n_words': 363}