Skip to content

Instantly share code, notes, and snippets.

@ConorCorp
Last active January 18, 2024 11:12
Show Gist options
  • Save ConorCorp/ac7ef3fe50b9c92593662a7cf7e3b1d0 to your computer and use it in GitHub Desktop.
Save ConorCorp/ac7ef3fe50b9c92593662a7cf7e3b1d0 to your computer and use it in GitHub Desktop.
#! /bin/sh
# Run this with
# curl -s https://gist.githubusercontent.com/ConorCorp/ac7ef3fe50b9c92593662a7cf7e3b1d0/raw/new-pc-setup.sh | zsh
echo "---- Running Computer Setup 👾"
echo "---- Setting Zsh as default"
zsh --version
chsh -s $(which zsh) || exit 1
echo "---- Allow downloads anywhere"
sudo spctl --master-disable || exit 1
echo "---- Brew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || exit 1
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/cmyg/.zprofile || exit 1
eval "$(/opt/homebrew/bin/brew shellenv)" || exit 1
echo "---- Git"
brew install git || exit 1
echo "---- Oh My Zsh"
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "Continue?"
read pyenv_version
echo "---- Autojump"
brew install autojump || exit 1
echo "---- Pyenv"
brew install pyenv || exit 1
echo "---- Install Newest Python"
pyenv install 3 || exit 1
pyenv versions || exit 1
echo "---- Enter most recent python version (above) to set globally:"
read pyenv_version || exit 1
pyenv global $pyenv_version || exit 1
echo "---- Global Python Version:"
python --version
echo "---- Rbenv"
brew install rbenv ruby-build || exit 1
echo "---- nvm"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash || exit 1
echo "---- Latest node"
nvm install node
echo "---- Install/Set Global Ruby 2.7.6 (React Native)"
rbenv install 2.7.6 || exit 1
rbenv global 2.7.6 || exit 1
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
echo "-- Global Ruby is now: "
ruby --version
echo "---- Cocoapods"
sudo gem install cocoapods || exit 1
echo "---- Watchman"
brew install watchman || exit 1
echo "---- JDK"
brew tap homebrew/cask-versions || exit 1
brew install --cask zulu17 || exit 1
brew info --cask zulu17 || exit 1
echo "---- Android Studio"
brew install --cask android-studio
echo "---- iterm2"
brew install --cask iterm2 || exit 1
echo "---- postman"
brew install --cask postman || exit 1
echo "---- powerline fonts"
git clone https://github.com/powerline/fonts.git --depth=1 || exit 1
cd fonts || exit 1
./install.sh || exit 1
cd .. || exit 1
rm -rf fonts || exit 1
echo "---- vscode"
brew install --cask visual-studio-code || exit 1
echo "---- Git name: Conor Lamb"
git config --global user.name "Conor Lamb" || exit 1
echo "---- Type email for git:"
read git_email || exit 1
git config --global user.email $git_email || exit 1
echo "---- Default Branch: Master"
git config --global init.defaultBranch master || exit 1
echo "---- Syncing .zshrc"
curl -s https://gist.githubusercontent.com/ConorCorp/9fa91bce0df27ab9c9f56d799b43fb2e/raw/.zshrc > ~/.zshrc || exit 1
echo "--- Zsh Plugins"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "---- Sourcing ~/.zshrc"
source ~/.zshrc || exit 1
echo "---- Setting mouse/trackpad speed"
defaults write -g com.apple.trackpad.scaling -float 3.0 || exit 1
# defaults write -g com.apple.mouse.scaling -float 9.0 || exit 1
echo "--------------------------------------------------------"
echo "---- Success 🎉"
echo "---- Please: "
echo "---- - log in/log out to update trackpad/mouse"
echo "---- - set git ssh: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent"
echo "---- - run 'brew info --cask zulu17' and double click the installer, and source-zrc"
echo "--------------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment