Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Last active October 20, 2022 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matschaffer/97048d8dc936db8d88f67f69ae43b826 to your computer and use it in GitHub Desktop.
Save matschaffer/97048d8dc936db8d88f67f69ae43b826 to your computer and use it in GitHub Desktop.
New Laptop Install list

Do first

  • Dropbox
  • 1Password

Managed

  • Slack
  • Flycut
  • Zoom
  • Google drive
  • Chrome
    • home
    • work

Self downloaded

CLI space

  • iTerm2
  • Homebrew
  • solarized
  • jet brains mono NF
# Utils
brew install gh direnv asdf rsync git jq yq gnupg ripgrep fd difftastic

# Vim
brew install neovim global

# Elastic
brew install mage gmailctl

# Safecast
brew install awsebcli awscli postgresql

# Like fd/find, but breadth first. zsh4humans uses it
brew install tavianator/tap/bfs
  • docker
  • direnv
  • asdf
    • nodejs
    • ruby
    • golang
    • python
  • rustup

Shell setup

elastic tooling

  • VPN
  • okta
  • terraform test
  • teleport
  • ecl

Data

rsync -az --info=progress2 (old):(dir) .
  • elastic
  • safecast
  • code
  • docs
  • ssh keys
  • gpg keys
  • gmailctl
  • minecraftservers
  • desktop
  • downloads
  • Movies
  • Music
  • Photos

Zsh config

# Define aliases.
alias tree='tree -a -I .git'
alias gst='git status'
alias vi='nvim'
alias k='kubectl'

# (...)

z4h source -- ${HOMEBREW_PREFIX:+$HOMEBREW_PREFIX/opt/asdf/libexec/asdf.sh}

export CLOUDSDK_PYTHON="${HOME}/.asdf/installs/python/3.9.9/bin/python"
z4h source -- ${HOME}/Applications/google-cloud-sdk/path.zsh.inc
z4h source -- ${HOME}/Applications/google-cloud-sdk/completion.zsh.inc

autoload -z edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
[alias]
co = checkout
st = status
prco = !gh pr checkout
prwait = "!f() { echo \"Attempting to merge ${1}...\"; while ! gh pr merge \"${1}\" -s 2>/dev/null; do sleep 30; done; osascript -e \"display notification \\\"${1} merged!\\\"\"; echo \"Merged.\"; }; f"
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}'
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
l = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
ll = log --stat --abbrev-commit
d = diff --color-words
home = config user.email "mat@schaffer.me"
work = config user.email "mat@elastic.co"
[web]
browser = open
[user]
name = Mat Schaffer
email = mat@elastic.co
[core]
excludesfile = /Users/matschaffer/.gitignore_global
[credential]
helper = store
[rerere]
enabled = true
[hub]
protocol = ssh
[rebase]
autoStash = true
[pull]
rebase = true
[init]
defaultBranch = main
# OS X
.DS_Store
# ctags
tags
# eclipse
.cache
.project
.classpath
# IntelliJ
.idea
out
*.iml
*.ipr
*.iws
# bundler binstubs
/b
.direnv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment