Skip to content

Instantly share code, notes, and snippets.

@adamghill
Last active December 18, 2023 13:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamghill/d107a729923dff1b6c0aa17c72d1c5ff to your computer and use it in GitHub Desktop.
Save adamghill/d107a729923dff1b6c0aa17c72d1c5ff to your computer and use it in GitHub Desktop.
Things to setup on a clean OSX install

An opinionated list of things that I tend to do on a clean install of OSX.

OSX applications

  • Rectange: Resize and move around windows with the keyboard
  • Postgres.app: Easiest way to run a local Postgres server
  • VS Code: For when an IDE might actually be useful
  • 1Password7: Better than a Post-It note stuck to your monitor
  • iTerm2: Terminal replacement
  • GitUp: A clean git UI
  • DevUtils: Offline toolbox for developers
  • Mimestream: Lightweight, native Gmail application
  • Postico: Nicest native Postgres UI client for the Mac
  • Sublime Text 3: Code editor with all the speed
  • Notable: Markdown note-taking that doesn't suck
  • Mark Text: Clean and usable Markdown editor

Homebrew

  • Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • brew tap homebrew/cask-fonts
  • brew install --cask font-hack-nerd-font
  • brew install bat lsd pyenv tmux vim fish diff-so-fancy starship pipx node

Make fish the default shell

sudo bash -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
chsh -s /opt/homebrew/bin/fish

Python-related

  • Install latest Python version: pyenv install 3.11
  • Install Poetry: pipx install poetry && poetry config virtualenvs.in-project 1
  • Install poethepoet: pipx install poethepoet

Git

  • git config --global push.autoSetupRemote true

Files

~/.gitconfig

[alias]
  c = commit -m
  a = add
  aa = !git add -u && git add . && git status
  co = checkout
  cob = checkout -b
  up = !git fetch origin && git rebase origin/master
  ir = !git rebase -i origin/master
  undo = reset HEAD~1 --mixed
  st = status --short
  last=log --name-status -1 HEAD
  amend = !git commit --amend
  pl = !git pull origin $(git name-rev --name-only HEAD)
  ps = !git push origin $(git name-rev --name-only HEAD)
  brv = "!f() { git branch --sort=-creatordate --color=always --format='%(color:reset)%(creatordate:short) %(color:bold white)%(align:2,right)%(upstream:trackshort)%(end)%(color:nobold) %(align:40,left)%(color:yellow)%(refname:short)%(end) %(color:reset)%(contents:subject)'; }; f"
  wip = for-each-ref --sort='-authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads

[core]
  pager = diff-so-fancy | less -iFRQX

~/.config/fish/config.fish

function ..
    cd ..
end

function cd..
    cd ..
end

export PYTHONDONTWRITEBYTECODE=1
starship init fish | source

status is-login; and pyenv init --path | source
status is-interactive; and pyenv init - | source

register-python-argcomplete --shell fish pipx | source

Sublime Text 3

Config is detailed more extensively in https://gist.github.com/adamghill/6a9690aea3a20f1ce705d7df794ed2f2.

VS Code

Extensions

Settings

Firefox

Extensions

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