Skip to content

Instantly share code, notes, and snippets.

@patrickhulce
Last active January 8, 2024 16:44
Show Gist options
  • Save patrickhulce/0a6b8979941cd1a95454fbd6ccc1d38c to your computer and use it in GitHub Desktop.
Save patrickhulce/0a6b8979941cd1a95454fbd6ccc1d38c to your computer and use it in GitHub Desktop.
Macbook Setup

setup steps

  1. Show battery percentage (now in control center prefs)

  2. Enable tap click, right click

  3. Hide dock

  4. Uncheck "close Windows when quitting an application"

  5. Update device name in Preferences > Sharing

  6. Install homebrew (installs xcode command line utils)

  7. Install Terminal

brew install iterm2
  1. Install oh-my-zsh https://github.com/robbyrussell/oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Install utils
brew install git
brew update
brew install mysql redis postgresql coreutils findutils rename jq git-lfs direnv hub jakehilborn/jakehilborn/displayplacer ffmpeg
sudo git lfs install --system
echo '\n# automatically load .envrc files\neval "$(direnv hook zsh)"' >> ~/.zshrc
source ~/.zshrc

brew services start mysql
brew services start postgresql
brew services start redis
  1. Install nvm
# Install NVM https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
All Installed
ansible		fontconfig	gradle		influxdb	libtiff		openjpeg	postgresql	webp
autoconf	freetype	grafana		jpeg		libtool		openssl		protobuf	x264
automake	fribidi		graphite2	jq		libvorbis	openssl@1.1	python		x265
bash		gdbm		harfbuzz	lame		libvpx		opus		python@2	xvid
cairo		gettext		heroku		libass		libyaml		pango		readline	xz
coreutils	giflib		heroku-node	libffi		little-cms2	pcre		redis
direnv		git-lfs		httrack		libgpg-error	mysql		pipenv		rename
fdk-aac		glib		hub		libksba		nasm		pixman		sqlite
ffmpeg		gnu-time	icu4c		libogg		nmap		pkg-config	texi2html
findutils	go		imagemagick	libpng		oniguruma	pngquant	tree
  1. Install Apps
brew install --cask google-chrome google-chrome-canary firefox spotify spectacle docker slack react-native-debugger google-cloud-sdk rescuetime microsoft-edge raycast miniconda
brew install --cask virtualbox virtualbox-extension-pack # requires accepting system preferences something
All Installed
android-platform-tools          google-cloud-sdk                java8                           virtualbox
android-sdk                     inkscape                        react-native-debugger           virtualbox-extension-pack
android-studio                  iterm2                          spotify                         xquartz
  1. Setup miniconda
conda init "$(basename "${SHELL}")" # Setup conda in your shell
conda config --set auto_activate_base false # Don't activate by default
  1. Install node versions
nvm install v10
nvm alias default v10
nvm use v10
nvm install v12 --reinstall-packages-from=v10 #after install npm packages
  1. Install npm packages
  • npm install -g create-react-app diff-so-fancy http-server jest lerna firebase-tools ndb pkgfiles siegem source-map-explorer surge typescript webpack yarn yo
All Installed
/Users/patrick/.nvm/versions/node/v10.15.3/lib
├── @patrickhulce/scripts@0.0.0 -> /Users/patrick/Code/OpenSource/hulk
├── @sentry/cli@1.41.1
├── appcenter-cli@1.1.5
├── cordova@8.1.2
├── cordova-icon@1.0.0
├── cordova-splash@1.0.0
├── create-react-app@3.0.1
├── diff-so-fancy@1.2.0
├── expo-cli@3.11.1
├── firebase-tools@7.5.0
├── gatsby-cli@2.7.53
├── http-server@0.11.1
├── imageoptim-cli@2.3.4
├── ionic@4.2.1
├── ios-deploy@1.9.4
├── jest@24.8.0
├── jest-codemods@0.19.1
├── lerna@3.4.3
├── UNMET PEER DEPENDENCY lighthouse@3.0.1
├── lighthouse-plugin-field-performance@1.0.3
├── mocha@5.2.0
├── ndb@1.1.5
├── npm@6.13.4
├── phonegap@8.0.0
├── pkgfiles@2.3.2
├── preact-cli@2.2.1
├── react-devtools@4.2.1
├── siegem@1.0.1
├── source-map-explorer@1.5.0
├── surge@0.20.1
├── tslint@5.10.0
├── typescript@3.7.4
├── uncss@0.16.2
├── webpack@4.15.1
├── yarn@1.21.1
└── yo@2.0.3
  1. Configure iTerm2
  • cp ~/Google\ Drive/Backups/iterm.plist ~/Library/Preferences/com.googlecode.iterm2.plist
Important Things
  • General > Reuse previous session
  • Text > 18pt Monaco
  • Window > Transparency
  • Terminal > 10000 Scrollback lines
  • Keys > Add Cmd+\ Shortcut = "Split Vertically"
  1. Configure Home/end behavior SO answer
mkdir -p ~/Library/KeyBindings && vi ~/Library/KeyBindings/DefaultKeyBinding.dict
{
    "\UF729"  = moveToBeginningOfLine:; // home
    "\UF72B"  = moveToEndOfLine:; // end
    "$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift-home
    "$\UF72B" = moveToEndOfLineAndModifySelection:; // shift-end
}
  1. Install ScrollReverser
  2. Setup VSCode
  • Setup code-insiders to PATH (SHIFT+CMD+P, "Shell command")
  • Install "Settings Sync" extension
  • Paste Github Token & Gist ID
  1. Clean up dock
  2. Change default web browser
  3. Install google drive client
  4. Configure git
  • Set global user profile
git config --global user.name 'Patrick Hulce'
git config --global user.email 'patrick.hulce@gmail.com'
git config --global core.pager "diff-so-fancy | less --tabs=4 -RF"
git config --global interactive.diffFilter "diff-so-fancy --patch"
  • Set a global gitignore
git config --global core.excludesfile ~/.gitignore_global
cat > ~/.gitignore_global <<EOF
.vscode/
.idea/
.nyc_output/
coverage/
node_modules/

*.local
*.secret
.envrc

npm-debug.log
yarn-error.log
lerna-debug.log

# from https://gist.github.com/octocat/9257657
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
EOF
  1. Copy over ~/.ssh dir
  2. Copy over ~/.zshrc hacks
cat >> ~/.zshrc <<'EOF'

export PATH="$PATH:$HOME/.scripts"

alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
alias chrome-canary='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary'

export GH_TOKEN=""
export PERSONAL_WPT_KEY=""
export WPT_KEY=""

export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
export ANDROID_BUILD_TOOLS="/usr/local/Caskroom/android-sdk/4333796/build-tools/27.0.3"
EOF
  1. Install XCode in App Store
sudo xcode-select -s /Applications/Xcode.app
sudo xcodebuild -license
  1. Configure Raycast 22. remove spotlight keyboard shortcut 23. change default browser to chrome
  2. Manually Export Each Certificate and Private Key in Keychain Access (Must right-click and "Export" each one individually or they won't be included)
  3. Setup Windows Development VM
  • Install from WIndows Insider Preview ISO
  • Enable Windows Subsystem for Linux
  • Install Ubuntu LTS
  • Setup Keybindings
    • Install Sharpkeys https://www.randyrants.com/category/sharpkeys/
      • Map Command to Ctrl + Ctrl to Command
    • Install Autohotkey https://www.autohotkey.com/
      • Map Ctrl+Tab to AltTab
      • Map Ctrl+Q to Alt+F4
      • Map Ctrl+Space to Win+Q
      • Map Ctrl+Alt+Win+Left to Win+Left (same for up/right)
      • Map Alt+C to Ctrl+C
      • Run script on startup
        • Find the script file, select it, and press Control+C.
        • Press Win+R to open the Run dialog, then enter shell:startup.
        • Right click inside the window, and click "Paste Shortcut".
LCtrl & Tab::AltTab
!Tab::Send {LCtrl down}{Tab}{LCtrl up}
!+Tab::Send {Shift down}{LCtrl down}{Tab}{LCtrl up}{Shift up}
LCtrl & Space::Send {LWin down}q{LWin up}
LAlt & c::Send {LCtrl down}c{LCtrl up}
LCtrl & q::Send !{f4}
- In macOS remove Cmd+Q === Quit binding
    - open ~/Library/Preferences/org.virtualbox.app.VirtualBoxVM.plist
    - Add `NSUserKeyEquivalents` dictionary, `Quit VirtualBox VM` key, `@~^\` value
  • Setup Ubuntu Environment
  • Install VS Code Insiders
  • Install Git bash
    • Copy ssh key to Git bash ssh dir
  • Install Node LTS (installs choco too)
  • Install nvm-windows
  1. Configure touchbar to be extended keyboard
  2. Disable the stupid epson scan notifications https://stevenwestmoreland.com/2020/07/how-to-remove-the-epson-scansmart-icon-from-the-macos-menu-bar.html Type id change the “501” part of the commands below to match your uid. Type launchctl disable gui/501/com.epson.scannermonitor Type launchctl disable gui/501/com.epson.eventmanager.agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment