|
# Brew and software |
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
|
brew tap homebrew/cask-versions |
|
brew install wget bash coreutils asdf tree git gnu-sed zsh rg yq ag gnupg remind101/formulae/assume-role hugo |
|
brew install --cask slack docker licecap divvy sublime-text visual-studio-code google-chrome zoom diffmerge bartender |
|
|
|
# ZSH |
|
# ON INTEL |
|
echo '/usr/local/bin/zsh' | sudo tee -a /etc/shells |
|
chsh -s /usr/local/bin/zsh |
|
# ON ARM |
|
echo '/opt/homebrew/bin/zsh' | sudo tee -a /etc/shells |
|
chsh -s /opt/homebrew/bin/zsh |
|
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
|
|
|
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc |
|
echo "export PATH=\$PATH:/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/bin" >> ~/.zshrc |
|
echo "eval \"\$(direnv hook zsh)\"" >> ~/.zshrc |
|
echo "export TF_PLUGIN_CACHE_DIR=\$HOME/.terraform.d/plugins" >> ~/.zshrc |
|
echo 'RPROMPT="[%D{%L:%M:%S}]"' >> ~/.zshrc |
|
echo 'go env -w CGO_LDFLAGS="-O2 -w -s -extldflags -static"' >> ~/.zshrc |
|
echo "export PATH=\$PATH:\$HOME/Library/Python/3.8/bin" >> ~/.zshrc |
|
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc |
|
|
|
sed 's/# DISABLE_MAGIC_FUNCTIONS="true"/DISABLE_MAGIC_FUNCTIONS="true"/g' < ~/.zshrc > ~/.zshrc-new |
|
mv ~/.zshrc-new ~/.zshrc |
|
|
|
# ASDF |
|
asdf plugin add awscli |
|
asdf plugin add direnv |
|
asdf plugin add golang |
|
asdf plugin add helm |
|
asdf plugin add helmfile |
|
asdf plugin add hey |
|
asdf plugin add jq |
|
asdf plugin add kubectl |
|
asdf plugin add nodejs |
|
asdf plugin add rust |
|
asdf plugin add sops |
|
asdf plugin add stern |
|
asdf plugin add terraform |
|
asdf plugin add terragrunt |
|
|
|
# grab ~/.tool-versions below and run |
|
asdf install |
|
|
|
# Golang Stuff |
|
echo "export GOPATH=\$HOME/go" >> ~/.zshrc |
|
echo "export CGO_ENABLED=0" >> ~/.zshrc |
|
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.zshrc |
|
echo "export GITHUB=\$GOPATH/src/github.com" >> ~/.zshrc |
|
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 "ms-azuretools.vscode-docker\ |
|
Tyriar.sort-lines \ |
|
bungcip.better-toml \ |
|
dbaeumer.vscode-eslint \ |
|
ms-python.python \ |
|
golang.go \ |
|
hashicorp.terraform \ |
|
emeraldwalk.runonsave \ |
|
zxh404.vscode-proto3" | tr " " "\n" | while read lib; do code --install-extension $lib; done |
|
|
|
echo '{"[typescript]":{"editor.formatOnSave":true},"editor.cursorBlinking":"solid","editor.rulers":[80,100,120],"editor.tabSize":2,"files.watcherExclude":{"**/.git/objects/**":true,"**/.git/subtree-cache/**":true,"**/node_modules/*/**":true,"**/.terragrunt-cache/**":true},"saveAndRun":{"commands":[{"match":".tf","cmd":"${env.HOME}/.asdf/shims/terraform fmt ${file}","useShortcut":false,"silent":true},{"match":"*.rs","cmd":"${env.HOME}/.asdf/shims/cargo fmt --manifest-path ${fileDirname}/../Cargo.toml","useShortcut":false,"silent":true},{"match":".hcl","cmd":"${env.HOME}/.asdf/shims/terragrunt hclfmt --terragrunt-hclfmt-file ${file}","useShortcut":false,"silent":true}]},"explorer.confirmDelete":false,"explorer.confirmDragAndDrop":false,"extensions.ignoreRecommendations":true,"files.trimTrailingWhitespace":true,"go.formatTool":"goimports","python.formatting.provider":"autopep8","python.pythonPath":"/usr/local/bin/python3","telemetry.telemetryLevel":"off","terminal.integrated.rendererType":"dom","terminal.integrated.profiles.osx":{"zsh":{"path":"/usr/local/bin/zsh"}},"terminal.integrated.defaultProfile.osx":"zsh","terminal.integrated.scrollback":2000,"terraform.codelens.enabled":false,"terraform.indexing":{"enabled":false},"terraform.telemetry.enabled":false,"workbench.colorTheme":"Quiet Light","workbench.iconTheme":null,"editor.renderWhitespace":"none","editor.renderControlCharacters":false,"breadcrumbs.enabled":false,"go.toolsEnvVars":{"GO111MODULE":"on"},"javascript.updateImportsOnFileMove.enabled":"never","files.associations":{"*.tfvars":"terraform","*.hcl":"terraform"},"workbench.editorAssociations":{"*.ipynb":"jupyter-notebook"},"workbench.editor.showTabs":false,"editor.codeLens":false,"security.workspace.trust.untrustedFiles":"open","diffEditor.ignoreTrimWhitespace":false,"rust-analyzer.server.path":"~/.vscode/extensions/rust-lang.rust-analyzer-0.3.1075-darwin-x64/server/rust-analyzer","rust-analyzer.inlayHints.typeHints.enable":false,"rust-analyzer.inlayHints.parameterHints.enable":false,"rust-analyzer.inlayHints.closingBraceHints.enable":false,"rust-analyzer.inlayHints.chainingHints.enable":false,"terminal.integrated.enableMultiLinePasteWarning":false}' > "$HOME/Library/Application Support/Code/User/settings.json" |
|
|
|
# Show hidden files |
|
defaults write com.apple.Finder AppleShowAllFiles true |
|
killall Finder |
|
|
|
# SSH Keys |
|
ssh-keygen -t rsa -b 4096 -C "rms1000watt@gmail.com" -f ~/.ssh/id_rsa_gmail |
|
cat << EOF >> ~/.ssh/config |
|
host github.com |
|
HostName github.com |
|
IdentityFile ~/.ssh/id_rsa_gmail |
|
User git |
|
EOF |
|
# Then upload this key to github |
|
|
|
# GPG |
|
gpg --generate-key |
|
|
|
# Git |
|
git config --global --edit |
|
git config --global pull.rebase false |
|
|
|
# Helm |
|
helm plugin install https://github.com/databus23/helm-diff --version master |
|
|
|
|
|
# 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 & Disable experimental features |
|
# 6. Terminal stuff: terminal.md |
|
# 7. Dock: Depress show recent applications in dock |
|
# 8. Finder: Preferences > Advanced > show all file extensions |
|
|
|
# I got too lazy... |
|
# - Install... https://github.com/yujitach/MenuMeters --> https://github.com/yujitach/MenuMeters/releases |
|
|
|
|
|
# Divvy Settings: |
|
# System Preferences > Security & Privacy > Privacy > Accessibility > Allow divvy |
|
# Select "Use global shortcut to display panel" and set it to: control + option + space |
|
|
|
# Menu Meters Settings |
|
# Network: Throughput + Depress show throughput values |
|
# CPU: Total (medium) + Percentage |
|
# Memory: Used Free Totals + Depress show use/free labels |
|
|
|
# Chrome extension |
|
# Ghostery, lastpass, authenticator |
|
|
|
# Download |
|
# - amphetamine |
|
|
|
# Install `update-all` in $PATH |
|
# git clone git@github.com:rms1000watt/ryan.git ~/go/src/github.com/rms1000watt/ryan |
|
# cd ~/go/src/github.com/rms1000watt/ryan |
|
# go install |
|
# ryan github-update-all -d $GITHUB/rms1000watt |