Skip to content

Instantly share code, notes, and snippets.

@ZachAttackMLR
Last active March 31, 2022 15:43
Show Gist options
  • Save ZachAttackMLR/a77ebf59790173e6579adf42ec76e774 to your computer and use it in GitHub Desktop.
Save ZachAttackMLR/a77ebf59790173e6579adf42ec76e774 to your computer and use it in GitHub Desktop.
Script to install tooling on a new Mac
#!/usr/bin/env zsh
# Install brew, zplug, vim-plug, tpm, and rustup (respectively)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Brew install packages
brew install zsh-autosuggestions zsh-completions exa fd lf neovim node starship tmux z nmap reattach-to-user-namespace safe-rm bat speedtest-cli go bottom ripgrep diff-so-fancy fzf awscli httpie grip
# Brew install casks
brew install --cask iterm2 burp-suite-professional spotify firefox hammerspoon
# Rust
cargo install cargo-update
# Install my dotfiles
mkdir -p ~/docs/repos/not/
git clone https://github.com/ZachAttackMLR/dotfiles ~/docs/repos/not/dotfiles
[ -f ~/.zshenv ] && mv ~/.zshenv ~/.old-zshenv
cp ~/docs/repos/not/dotfiles/.zshenv ~/.zshenv
cp -r ~/docs/repos/not/dotfiles/.config/ ~/.config
# Install Hack Nerd Font
curl https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest \
| grep "browser_download_url" \
| grep "Hack.zip" \
| cut -d : -f 2,3 \
| tr -d \" \
| xargs curl -fsLJO -P ~/Downloads/
echo "\033[1;33mHack.zip is the ~/Downloads/ folder, but must still be manually installed\033[0m"
echo "\033[1;33mIf on macOS, unzip the file, then double click the *.ttf files you'd like to install\033[0m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment