opexxx
9/3/2018 - 11:04 AM

New Computer Install

New Computer Install

# Brew and software
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/versions
brew install bash go tree git zsh node python3 awscli direnv
brew cask install slack docker kitematic macdown caffeine licecap etcher royal-tsx divvy sublime-text visual-studio-code-insiders google-chrome
sudo pip3 install jinja2 jinja2-cli

# ZSH
echo '/usr/local/bin/zsh' | sudo tee -a /etc/shells 
chsh -s /usr/local/bin/zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "export PATH=\$PATH:/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin" >> ~/.zshrc
echo "export PATH=~/Library/Python/2.7/bin:\$PATH" >> ~/.zshrc
echo "export PATH=~/Library/Python/3.7/bin:\$PATH" >> ~/.zshrc
echo "eval \"\$(direnv hook zsh)\"" >> ~/.zshrc

# Golang Stuff
echo "export PATH=\$PATH:$HOME/go/bin" >> ~/.zshrc
echo "export GOPATH=\$HOME/go" >> ~/.zshrc
go get -u -v github.com/kardianos/govendor
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/lukehoban/go-outline
go get -u -v github.com/nsf/gocode
go get -u -v golang.org/x/tools/cmd/goimports
go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
go get -u -v github.com/ramya-rao-a/go-outline
go get -u -v github.com/acroca/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/fatih/gomodifytags
go get -u -v github.com/haya14busa/goplay/cmd/goplay
go get -u -v github.com/josharian/impl
go get -u -v github.com/cweill/gotests/...


# VS Code
echo "PeterJausovec.vscode-docker \
Tyriar.sort-lines \
bungcip.better-toml \
dbaeumer.vscode-eslint \
donjayamanne.python \
lukehoban.Go \
mauve.terraform \
zxh404.vscode-proto3" | tr " " "\n" | while read lib; do "/Applications/Visual Studio Code - Insiders.app//Contents/Resources/app/bin/code" --install-extension $lib; done

# echo '{"editor.cursorBlinking":"solid","editor.rulers":[80,100,120],"editor.tabSize":2,"go.formatTool":"goimports","terminal.integrated.shell.osx":"/usr/local/bin/zsh","workbench.iconTheme":null,"workbench.editor.showTabs":false,"explorer.confirmDragAndDrop":false,"extensions.ignoreRecommendations":false,"window.zoomLevel":0,"explorer.confirmDelete":false,"python.formatting.provider":"autopep8","files.trimTrailingWhitespace":true,"telemetry.enableTelemetry":false,"telemetry.enableCrashReporter":false,"emeraldwalk.runonsave":{"commands":[{"match":".tf","isAsync":true,"cmd":"terraform fmt ${file}"}]},"python.pythonPath":"/usr/local/bin/python3"}' | python -m json.tool > "$HOME/Library/Application Support/Code - Insiders/User/settings.json"
echo '{"editor.cursorBlinking":"solid","editor.rulers":[80,100,120],"editor.tabSize":2,"go.formatTool":"goimports","terminal.integrated.shell.osx":"/usr/local/bin/zsh","workbench.editor.showTabs":false,"explorer.confirmDragAndDrop":false,"extensions.ignoreRecommendations":true,"window.zoomLevel":0,"explorer.confirmDelete":false,"python.formatting.provider":"autopep8","files.trimTrailingWhitespace":true,"telemetry.enableTelemetry":false,"telemetry.enableCrashReporter":false,"emeraldwalk.runonsave":{"commands":[{"match":".tf","isAsync":true,"cmd":"terraform fmt ${file}"}]},"python.pythonPath":"/usr/local/bin/python3","workbench.iconTheme":null,"workbench.colorTheme":"Quiet Light"}' | python -m json.tool > "$HOME/Library/Application Support/Code - Insiders/User/settings.json"


# Show hidden files
defaults write com.apple.Finder AppleShowAllFiles true
killall Finder

# Manual Stuff
# 1. Keyboard: Key Repeat=fastest, Delay Until Repeat=shortest
# 2. Keyboard: Disable use smart quotes and dashes
# 3. Displays: Adjust resolution by 1
# 4. Mission Control: Disable automatically rearrange spaces based on most recent use
# 5. Docker: Preference update RAM to 8GB
# 6. Terminal stuff: terminal.md

# I got too lazy...
# - Install... https://github.com/yujitach/MenuMeters
# - Remove url-quote-magic from zsh https://stackoverflow.com/questions/25614613/how-to-disable-zsh-substitution-autocomplete-with-url-and-backslashes

Configure Terminal

My only beef with default Terminal is the default theme. Here is how to change it.

Update Terminal to use a dark theme

  • Open a new Terminal and go to Preferences
  • Select the Profiles tab
  • Select the Pro theme on the left
  • Set as default

Fix background opacity and color

  • In the Profiles tab in the Text tab under the Background section, click the black square next to Color & Effects
  • Adjust the opacity setting to 100%
  • Click the next tab with the sliders
  • In the dropdown that says Gray Scale Slider select RGB Sliders and set RGB to 30, 30, 30
  • Close this screen

Fix text boldness

  • In the Profiles tab in the Text tab under the Text section, depress the Use bold fonts setting
  • Exit Terminal completely