Skip to content

Instantly share code, notes, and snippets.

@ekalvi
Last active November 17, 2022 09:20
Show Gist options
  • Save ekalvi/d745be2dca86b4aa35bc20cbc771d15c to your computer and use it in GitHub Desktop.
Save ekalvi/d745be2dca86b4aa35bc20cbc771d15c to your computer and use it in GitHub Desktop.
Setup Meya Mac

Prerequisites

  1. Make sure you have your 1password recovery page
  2. Remember to visit https://gist.github.com/ekalvi to get this gist as the first step of setting up the Mac
    • from terminal: nano setup.sh > paste the contents of setup-meya-mac.sh
    • chmod +x setup.sh
    • ./setup.sh
  3. Make sure you're signed into the App Store

Manual steps while/after running the setup-meya-mac.sh

  1. [optional] reverse command/option keys if using a non-Apple keyboard
  2. [optional] reverse scroll direction on mouse if using a non-Apple mouse
  3. Login into 1password using your recovery
  4. Login into Chrome via Google SSO
  5. Login into https://github.com
  6. [GitHub] Copy the output of the keygen to the clipboard
    • found in script output
    • alternatively, run cat ~/.ssh/id_rsa.pub
  7. [GitHub] Create a new SSH Key -> https://github.com/settings/ssh/new
    • Title something like "YOUR_NAME iMac"
    • paste key and click "Add SSH key"
  8. [GitHub] Generate a new personal access token in GitHub
    • https://github.com/settings/tokens -> "Generate new token"
    • store it locally in a temp file before running setup-meya-mac.sh
    • make sure to delete the key after running the script
    • paste this in the setup command prompt as the GitHub password required to clone the repo
  9. Install Sophos
  1. Install Sophos Home on all of your Meya Mac computers by following this link: https://accounts.home.sophos.com/install/4d2fcda861d9e38591db2314c005b311/ff30c13867fa40d92403b61284219139
  2. Click "Download"
  3. Unzip the file, and double click the Sophos install file
  4. IMPORTANT: make sure that open "Seucrity & Privacy" > "General" and click "Allow" to give Sophos the required access (the installer guides you through this)
  5. Verify that the Sophos app is running in your Mac menu bar and says "You are Protected" when opened The Sophos scans are centrally managed from cloud software.
  1. Install Vanta

As part of Meya.ai's ongoing security and compliance policies, we have a few requirements:

  • opt-in to background check
  • accept security policies
  • download and install vanta app on your mac

https://vanta.com/manage/onboarding

If you need to login: https://vanta.com/login

  1. Login into Slack
  2. Verify that you can login to GMail/Drive/Calendar/etc
  3. Remove all unused app from Dock
  4. Add all installed apps to Dock
  5. Login to PyCharm, GitHub desktop, SequelPro, etc.
  6. Start Docker, Spectacle, Caffeine, Sophos
  7. Set screensaver to autolock after 2 minutes w/ required password. Add hot corners
  8. [optional] Download locl.pem from 1password for ssh access to AWS servers
#!/bin/bash
echo "🖥 Setting up your Meya Mac..."
cd ~
# Check that Homebrew is installed and install if not
if test ! $(which brew)
then
echo "🍻 Installing Homebrew for you."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update any existing homebrew recipes
brew update
# Upgrade any already installed formulae
brew upgrade
# Install desired cask packages
brew install git
brew install zsh
brew install node
brew install python
brew install curl
brew install yarn
brew install awscli
brew install mas
brew install --cask google-chrome
brew install --cask 1password
brew install --cask slack
brew install --cask pycharm
brew install --cask github
brew install --cask iterm2
brew install --cask sequel-pro
brew install --cask spectacle
# less essential
brew install --cask sublime-text
brew install --cask datagrip
brew install --cask docker
brew install --cask licecap
brew install --cask firefox
brew install --cask postman
# Remove brew cruft
brew cleanup --force
rm -f -r /Library/Caches/Homebrew/*
# install mac app store apps
mas install 937984704 # amphetamine
# set Chrome as default browser
open -a "Google Chrome" --args --make-default-browser
echo ""
echo "🔑 Initializing git and GitHub credentials..."
# initialize git
echo "What's your full name? (used for GitHub)"
read full_name
echo "What's your email address? (used for GitHub)"
read email
git config --global user.name "$full_name"
git config --global user.email "$email"
git config --global credential.helper osxkeychain
echo ""
ssh-keygen -t rsa -b 4096 -C "$email"
echo "Copy/paste the following public key into GitHub -> https://github.com/settings/ssh/new"
echo ""
cat ~/.ssh/id_rsa.pub
echo ""
echo "Also, while there, create a new personal access token -> https://github.com/settings/tokens"
echo ""
mkdir ~/code
cd ~/code
# this force me to enter github token due to 2FA
git clone https://github.com/meya-ai/locl
cd ~
echo "Open 1password and find your AWS credentials..."
aws configure
# install Oh My Zsh!
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment