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
| # OSX Settings | |
| fancy_echo "Setting desktop background..." | |
| curl https://raw.githubusercontent.com/spartaglobal/laptop/master/assets/avatar.jpg > "$HOME/Pictures/avatar.jpg" | |
| curl https://raw.githubusercontent.com/spartaglobal/laptop/master/assets/desktop-bg.png > "$HOME/Pictures/desktop-bg.png" | |
| osascript <<EOD | |
| tell application "Finder" | |
| set desktop picture to "$HOME/Pictures/desktop-bg.png" as POSIX file | |
| end tell | |
| EOD |
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
| echo "0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 4 dsAttrTypeStandard:RecordName externalbinary:dsAttrTypeStandard:JPEGPhoto dsAttrTypeStandard:UniqueID dsAttrTypeStandard:PrimaryGroupID dsAttrTypeStandard:GeneratedUID" > $HOME/avatar_import.txt | |
| echo $USER:$HOME/Pictures/avatar.jpg:$UID:$(id -g):$(dscl . -read /Users/$USER GeneratedUID | cut -d' ' -f2) >> $HOME/avatar_import.txt | |
| echo $passwd | sudo -S -k sudo dscl . -delete /Users/$USER JPEGPhoto | |
| echo $passwd | sudo -S -k sudo dsimport $HOME/avatar_import.txt /Local/Default M -u diradmin | |
| rm -f $HOME/avatar_import.txt |
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
| # Fonts | |
| fancy_echo "Downloading & Installing fonts..." | |
| curl -s https://raw.githubusercontent.com/spartaglobal/laptop/master/assets/fonts.zip | tar xvz -C "$HOME/Desktop/Fonts" | |
| echo $passwd | sudo -S -k cp $HOME/Desktop/Fonts/*.ttf /Library/Fonts | |
| rm -rf $HOME/Desktop/Fonts/ |
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
| # Fonts | |
| fancy_echo "Downloading & Installing fonts..." | |
| curl -s https://raw.githubusercontent.com/spartaglobal/laptop/master/assets/fonts.zip | tar xvz -C "$HOME/Desktop/Fonts" | |
| echo $passwd | sudo -S -k cp $HOME/Desktop/Fonts/*.ttf /Library/Fonts | |
| rm -rf $HOME/Desktop/Fonts/ | |
| fancy_echo "Rebuilding font cache..." | |
| echo $passwd | sudo -S -k atsutil databases -remove |
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
| # Install tccutil and add terminal to list of allowed assistive devices | |
| curl -O https://raw.githubusercontent.com/jacobsalmela/tccutil/master/tccutil.py | |
| echo $passwd | sudo -S -k python ./tccutil.py --verbose --insert com.apple.Terminal | |
| fancy_echo "Configuring terminal..." | |
| # Set Terminal Colors | |
| curl https://raw.githubusercontent.com/spartaglobal/laptop/master/assets/SpartaPro.terminal > "$HOME/SpartaPro.terminal" | |
| open "$HOME/SpartaPro.terminal" | |
| osascript <<EOD |
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
| # Install Homebrew | |
| fancy_echo "Creating ~/.bin folder..." | |
| if [ ! -d "$HOME/.bin/" ]; then | |
| mkdir "$HOME/.bin" | |
| fi | |
| HOMEBREW_PREFIX="/usr/local" | |
| if [ -d "$HOMEBREW_PREFIX" ]; 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
| fancy_echo "Installing sparta libs and tools..." | |
| brew install openssl libxml2 libyaml ctags git vim heroku-toolbelt hub imagemagick curl chromedriver httpie node | |
| # Install Ruby | |
| fancy_echo "Installing rbenv..." | |
| brew install rbenv ruby-build rbenv-default-gems | |
| # Install Databases | |
| fancy_echo "Installing database tools..." | |
| brew install postgres redis sqlite mongodb mysql |
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
| # Install Ruby | |
| find_latest_ruby() { | |
| rbenv install -l | grep -v - | tail -1 | sed -e 's/^ *//' | |
| } | |
| ruby_version="$(find_latest_ruby)" | |
| fancy_echo "Installing and Configuring rbenv and ruby..." | |
| # append_to_zshrc 'eval "$(rbenv init - --no-rehash)"' 1 |
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
| rbenv global "$ruby_version" | |
| gem update --system | |
| gem_install_or_update 'bundler' | |
| gem_install_or_update 'brice' | |
| gem_install_or_update 'pry' | |
| gem_install_or_update 'pry-doc' | |
| gem_install_or_update 'awesome_print' | |
| number_of_cores=$(sysctl -n hw.ncpu) | |
| bundle config --global jobs $((number_of_cores - 1)) |
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
| # Update NPM | |
| fancy_echo "Updating NPM..." | |
| npm update npm -g | |
| npm update -g |