Skip to content

Instantly share code, notes, and snippets.

@mwhagedorn
Last active September 4, 2025 17:20
Show Gist options
  • Select an option

  • Save mwhagedorn/beb9a2099906146f47581ca0b92c16af to your computer and use it in GitHub Desktop.

Select an option

Save mwhagedorn/beb9a2099906146f47581ca0b92c16af to your computer and use it in GitHub Desktop.
basic laptop setup script
# add install stuff here that you are only likely to care about
# lives in your home folder
if ! brew list --cask | grep -q "^pycharm-ce$"; then
brew install --cask pycharm-ce
else
echo "Pycharm Community is already installed"
fi
brew install --cask iterm2
brew install --cask obsidian
brew install lsusb
#!/bin/zsh
# Setup Zsch
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing Oh My Zsh..."
(sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)")
else
echo "Oh My Zsh is already installed."
fi
# Ensure plugins are present in .zshrc
ZSHRC="$HOME/.zshrc"
PLUGINS_LINE="plugins=(git ruby python)"
if grep -q "^plugins=" "$ZSHRC"; then
# Replace existing plugins line
sed -i.bak "s/^plugins=.*/$PLUGINS_LINE/" "$ZSHRC"
else
# Add plugins line if not present
echo "$PLUGINS_LINE" >> "$ZSHRC"
fi
# Install Homebrew if not present
if ! command -v brew &>/dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install packages
brew install --cask docker
brew install ngrok
brew install awscli
brew install terraform
brew install python
brew install uv
brew install --cask visual-studio-code
brew install git
brew install gh
brew install --cask google-chrome
# Check if Git user.name is set
if [ -z "$(git config --global user.name)" ]; then
echo "Enter your Git user name: "
read git_user_name
git config --global user.name "$git_user_name"
else
echo "Git user name is already set to: $(git config --global user.name)"
fi
# Check if Git user.email is set
if [ -z "$(git config --global user.email)" ]; then
echo "Enter your Git email: "
read git_user_email
git config --global user.email "$git_user_email"
else
echo "Git email is already set to: $(git config --global user.email)"
fi
# API Keys
if ! grep -q '^export OPENAI_API_KEY=' ~/.zshrc; then
echo 'export OPENAI_API_KEY="your_openai_key_here"' >> ~/.zshrc
fi
# Set another API key if not already present
if ! grep -q '^export ANOTHER_API_KEY=' ~/.zshrc; then
echo 'export ANOTHER_API_KEY="your_other_key_here"' >> ~/.zshrc
fi
# Reload shell profile
source ~/.zshrc
if [ -f "$HOME/.setup_dev.local" ]; then
fancy_echo "Running your customizations from ~/.laptop.local ..."
. "$HOME/.setup_dev.local"
fi
echo "Setup complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment