Skip to content

Instantly share code, notes, and snippets.

@bplaat
Last active November 9, 2026 12:04
Show Gist options
  • Select an option

  • Save bplaat/2152d31d40955bcbb699fae467e76c8a to your computer and use it in GitHub Desktop.

Select an option

Save bplaat/2152d31d40955bcbb699fae467e76c8a to your computer and use it in GitHub Desktop.
macOS Setup

macOS Setup

  • Setup macOS
  • Setup displays, user avatar, appearance color and wallpaper
  • Keyboard key repeat time
  • Install homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install essential casks
    brew install --cask -y android-file-transfer zen ghostty ungoogled-chromium grandperspective iina mullvad-vpn tailscale rectangle mos caffeine localsend vscodium android-studio image2icon qbittorrent
  • Setup Rectangle
  • Setup Mos
    • Step: 35
    • Speed: 3
    • Duration: 3
  • Install oh my zsh
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • Copy .zshrc and .gitconfig
  • Update hostname and other settings
    sudo scutil --set ComputerName "BassieMac"
    sudo scutil --set LocalHostName "BassieMac"
    sudo scutil --set HostName "BassieMac.local"
  • Don't write ._* files everywhere
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
    defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
  • Setup dock and finder
    defaults write com.apple.dock autohide-delay -float 0
    defaults write com.apple.dock autohide-time-modifier -float 0
    killall Dock
  • Setup Zen Browser
  • Setup Mullvad VPN
  • Setup VSCodium and GitHub keys
  • Install stuff from App Store: XCode
  • Install more stuff
    brew install -y nano gh hexyl btop htop nasm fastfetch node openjdk@25 openjdk@17 maven kotlin yt-dlp ffmpeg jadx llvm lld cunit
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
    sudo ln -sfn /opt/homebrew/opt/openjdk@25/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-25.jdk
    softwareupdate --install-rosetta --agree-to-license
  • Install Games and emulators
    brew install --cask steam dolphin melonds
  • Install VMware Fusion and setup Windows 11 ARM with:
    defaults write com.vmware.fusion fusionDevicesToolbarItemIsExpanded -bool false
[user]
name = Bastiaan van der Plaat
email = bastiaan.v.d.plaat@gmail.com
[core]
autocrlf = false
editor = nano
[help]
autocorrect = prompt
[fetch]
prune = true
[init]
defaultBranch = master
[alias]
# Force push
pushf = push --force-with-lease
# Log in a single-line format
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# Sync master branch with upstream remote master
sync = "!f() { \
main_branch=`git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'`; \
git checkout $main_branch && git pull -r upstream $main_branch; \
}; f"
# Get random fixme
fixme = "!f() { git grep -Ein '(FIXME|TODO)' | shuf -n1; }; f"
# Contributers
contrib = "shortlog -sne HEAD"
# Oh my zsh
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="af-magic"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
alias ll="ls -alh"
alias hd="hexyl"
export EDITOR=nano
export TERM=xterm-256color
export JAVA_HOME=$(/usr/libexec/java_home -v 21)
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_NDK_ROOT="$ANDROID_HOME/ndk/29.0.14206865"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:$HOME/Software/oss-cad-suite/bin"
export SERENITY_TOOLCHAIN=Clang
export SERENITY_ARCH=aarch64
#!/usr/bin/env bash
set -euo pipefail
PROJECTS_DIR="$HOME/Projects"
GITHUB_USER="bplaat"
# Check GitHub authentication
gh auth status >/dev/null || gh auth login
mkdir -p "$PROJECTS_DIR"
# Get personal account and all organization memberships
owners=("$GITHUB_USER")
while IFS= read -r org; do
owners+=("$org")
done < <(gh api --paginate --jq '.[].login' /user/orgs)
# Clone or update every repository
for owner in "${owners[@]}"; do
echo "Processing $owner..."
mkdir -p "$PROJECTS_DIR/$owner"
if [[ "$owner" == "$GITHUB_USER" ]]; then
endpoint="/user/repos?affiliation=owner&per_page=100"
else
endpoint="/orgs/$owner/repos?type=all&per_page=100"
fi
while IFS=$'\t' read -r name url; do
[[ -z "$name" ]] && continue
target="$PROJECTS_DIR/$owner/$name"
if [[ -d "$target/.git" ]]; then
echo "Updating $owner/$name"
git -C "$target" pull --ff-only
elif [[ -e "$target" ]]; then
echo "Skipping $target (already exists)"
else
echo "Cloning $owner/$name"
git clone "$url" "$target"
fi
done < <(
gh api --paginate --jq '.[] | [.name, .ssh_url] | @tsv' "$endpoint"
)
done
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment