Skip to content

Instantly share code, notes, and snippets.

@noahcoad
Last active February 12, 2024 05:30
Show Gist options
  • Save noahcoad/f980237a3ca1edcf4439050da57172cb to your computer and use it in GitHub Desktop.
Save noahcoad/f980237a3ca1edcf4439050da57172cb to your computer and use it in GitHub Desktop.
New Computer Setup

New Computer Setup for Mac

The steps I use to restore a new mac to the settings and apps I like to use.

Restoring

  • Also restore from Time Machine personal mac OSX "Notes" stored locally (not in iCloud)

Commands

Note: My Homebrew file for CLI and GUI apps at: Brewfile

# Apple M1 support
export PATH=/opt/homebrew/bin:$PATH
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
sudo sh -c 'echo /opt/homebrew/bin > /etc/paths.d/homebrew'

# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Apple M1: Intel brew
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
alias ibrew="arch -x86_64 /usr/local/bin/brew"
ibrew install python@3.7 coreutils arduino-cli avr-gcc rbenv

# AWS Laptop see steps below

# brew initial support apps
brew install caffeine curl

# brew full list of apps from ~/code/conf/Brewfile
curl -s https://dl.dropboxusercontent.com/s/10xuuteg1i1w80q/Brewfile | brew bundle install --file=-

# Intel MAC
brew install --user docker docker-compose docker-machine

# log into dropbox and wait for sync completion for next steps

# symlink to core folders
for a in code txt; do ln -s ~/dropbox/$a ~/; done
for a in ~/code/conf/dot/*; do echo .$(basename $a); rm -rf ~/.$(basename $a); ln -s $(realpath $a) ~/.$(basename $a); done

# gems
gem install --user-install bcat

# python on osx
launchctl setenv PYTHONPATH $HOME/code/py/lib
python3 -m pip install --upgrade pip
python3 -m pip install --user -r ~/code/conf/pip3-freeze

# sublime .. QUIT sublime FIRST
# ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
rm -f -r "$HOME/Library/Application Support/Sublime Text/Packages"; ln -s ~/dropbox/code/conf/sublime-text-3/Packages "$HOME/Library/Application Support/Sublime Text/"
rm -f -r "$HOME/Library/Application Support/Sublime Text/Installed Packages"; ln -s ~/dropbox/code/conf/sublime-text-3/Installed\ Packages "$HOME/Library/Application Support/Sublime Text/"
rm -f -r "$HOME/Library/Application Support/Sublime Text/Packages/open-url"; ln -s ~/dropbox/code/prjs/sublime/open-url "$HOME/Library/Application Support/Sublime Text/Packages/"

# alfred keyword generator and workflows .. quit Alfred first
sed "s/\$HOME/\/Users\/$USER/" < ~/code/py/misc/alfred_url_keyword_workflow_maker_watcher.plist > ~/Library/LaunchAgents/alfred_url_keyword_workflow_maker_watcher.plist
launchctl load $HOME/Library/LaunchAgents/alfred_url_keyword_workflow_maker_watcher.plist
rm -f -r ~/Library/Application\ Support/Alfred/Alfred.alfredpreferences; ln -s ~/dropbox/code/conf/alfred/Alfred.alfredpreferences ~/Library/Application\ Support/Alfred/

# node, nvm, npm conf
mkdir -p ~/.nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
nvm install node
npm install -g npm mqtt-cli aws-cdk gnomon

# other app settings
rm -f ~/Library/Containers/org.filezilla-project.filezilla.sandbox; ln -s ~/code/conf/Containers/org.filezilla-project.filezilla.sandbox ~/Library/Containers/
rm -f ~/Library/Preferences/com.clipy-app.Clipy.plist; ln -s ~/code/conf/clipy/com.clipy-app.Clipy.plist ~/Library/Preferences/
mv ~/Dropbox ~/dropbox
mkdir -p ~/bin; ln -s "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" ~/bin/smerge

# system environment variables
cp ~/code/scripts/apple/LaunchAgents/environment.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/environment.plist

# update diplay config in
~/txt/my/cmd_displayplacer.txt

# fix permissions
chmod 600 ~/.ssh/id_rsa

Other

  • Enable brew update and upgrade daily from cron, ~/txt/my/learn_cron.txt
  • Apps from Mac App Store: iA Writer, Adblock Plus for Safari, Tampermonkey, Messenger, FileZilla Pro, WhatsApp, SerialTools, MS Remote Desktop, Better Snap Tools, Howler Timer, Kindle, MS OneNote, Marked 2, Blackmagic Disk Speed Test, XCode,
  • Launch apps (license + configure): sublime text, dropbox, bartender, BetterSnapTool, photos
  • Microsoft Office + all updates
  • Docker Desktop
  • Java JRE
  • Virtual Box
  • finder right-click "copy path" how to: Automator > new "Quick Action" > choose "Copy to Clipboard" > "files or folders" in "Finder" > save "Copy Path"
  • finder right-click "Preview" how to: Automator > new "Quick Action" > choose "Open Images in Preview" > top right select "files or folders" in "Finder" > save as "Preview"
  • create 'dump' desktop icon
  • hide 'Google Drive' desktop icon
  • Audacity w lameosx64bitdl
  • Logitech BRIO Webcam Settings app
  • Amazon: Phone Tool widgets incl HyperBadge
  • restore Mail and Outlook signatures: email_signature.txt
  • tampermonkey scripts
  • check hotkey python scripts, like cmd+shift+s, ~/code/py/misc/clipfix.py
  • App Config
    • Outlook: Outlook menu > Turn Off Reminders
    • Clippy Snippets: chime > to/link/deets
  • github personal access token

AWS Laptop

Supplimental for setting up an AWS laptop. See ~/txt/my/computer_setup_aws.md once files are restored.

OSX Settings

  • scripted via ~/code/scripts/apply_osx_preferences.sh
    • tap to click
    • scrolling direction
    • three-finger drag
    • keyboard speed
    • autohide dock
    • hot corner for display sleep
  • startup apps: Preferences > Users & Groups > Noah > Statup Items
  • hostname
  • notifications do not distrub
  • sign into icloud
  • iMessage Cloud: Message > Preferences > iMessage > Enable Messages in iCloud
  • turn off notifications: Preferences > Notifications & Focus
  • show sound in menu bar: Preference > Sound > "Show Sound in menu bar" = always
  • keyboard
    • shortcuts > use keyboard to navigate (tabs)
    • shortcuts > Key Repeat, Delay Until Repeat
    • disable period w double space
    • Keyboard > Modifier Keys... > Caps Lock (map to escape)
  • safari: Preferences > Advanced > Show Full Address + Show Developer Menu, View > Show Favorites Bar
  • mail
    • signatures
    • Preferences > Privacy > uncheck "Protect Mail Activity"
  • open .txt w sublime
  • open .md w iA Writer
  • printers
  • don't require touch ID for safari passwords: settings > touch id > uncheck "password autofill"
  • enable "Location Services": Preferences > Security & Privacy > Privacy tab > "Location Services" menu

Save config with

brew bundle dump --file=~/code/conf/Brewfile
pip3 freeze | sed 's/=.*//' > ~/code/conf/pip3-freeze

Thanks to these helpful posts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment