Skip to content

Instantly share code, notes, and snippets.

@phiSgr
Last active July 8, 2024 17:34
Show Gist options
  • Save phiSgr/1a5fac40a603fed8884e997183b93f43 to your computer and use it in GitHub Desktop.
Save phiSgr/1a5fac40a603fed8884e997183b93f43 to your computer and use it in GitHub Desktop.
Fresh Mac
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
brew install iterm2 firefox intellij-idea-ce telegram-desktop sublime-text tunnelblick google-backup-and-sync
brew install visualvm slack
brew install --cask docker
brew install --cask zulu
brew install --cask unnaturalscrollwheels
brew install --cask notunes
brew install --cask hammerspoon
curl -sSL https://github.com/peterklijn/hammerspoon-shiftit/raw/master/Spoons/ShiftIt.spoon.zip > ShiftIt.spoon.zip
unzip ShiftIt.spoon.zip
open ShiftIt.spoon
echo 'hs.loadSpoon("ShiftIt")
spoon.ShiftIt:bindHotkeys({})
hs.hotkey.bind(spoon.ShiftIt.mash, "s", function() hs.caffeinate.startScreensaver() end)
hs.hotkey.bind(spoon.ShiftIt.mash, "h", function() hs.caffeinate.systemSleep() end)' >> ~/.hammerspoon/init.lua
ssh-keygen -o -t rsa -b 4096 -C "phisgr@gmail.com"
# https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000013224/comments/360000193450
echo 'bindkey "\\e\\eOD" backward-word' >> ~/.zshrc
echo 'bindkey "\\e\\eOC" forward-word' >> ~/.zshrc
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
echo 'alias k=kubectl' >> ~/.zshrc
echo "source <(kubectl completion zsh)" >> ~/.zshrc
echo "alias llh='ls -alh'" >> ~/.zshrc
echo 'unsetopt share_history' >> ~/.zshrc
sed -i.bak "s/# zstyle ':omz:update' mode auto/zstyle ':omz:update' mode auto/" ~/.zshrc
diff ~/.zshrc ~/.zshrc.bak
rm ~/.zshrc.bak
# https://stackoverflow.com/questions/8832201/git-how-to-get-ours-theirs-original-for-merge-conflicts
git config --global merge.conflictstyle diff3
brew install postgresql
echo '\pset pager off' >> ~/.psqlrc
# https://stackoverflow.com/questions/28296411/how-to-touch-a-file-and-mkdir-if-needed-in-one-line/28302789#28302789
echo 'touch() { mkdir -p $( dirname "$1") && /usr/bin/touch "$1" }' >> ~/.zshrc
git config --global core.excludesfile ~/.gitignore
echo '.idea' >> ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment