Skip to content

Instantly share code, notes, and snippets.

@wanewang
Forked from hlb/Brewfile
Last active June 10, 2021 02:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wanewang/2fda54f9a94fff48f21a to your computer and use it in GitHub Desktop.
Save wanewang/2fda54f9a94fff48f21a to your computer and use it in GitHub Desktop.
clean install

System Preferences

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Display App Swithcer on all screens
defaults write com.apple.Dock appswitcher-all-displays -bool true

# Set a shorter Delay until key repeat		
defaults write NSGlobalDomain InitialKeyRepeat -int 6

# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 2

# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0

# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

# Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true

# Show Status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true

# Show icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true && \
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true && \
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true && \
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true

# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true && \
defaults write com.apple.Safari IncludeDevelopMenu -bool true && \
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true && \
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true && \
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

# Show absolute path in finder's title bar. 
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

# Show build duration for Xcode
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES

# Disable Chrome guest mode
defaults write com.google.Chrome BrowserGuestModeEnabled -bool false
# Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Disable window animations ("new window" scale effect)
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Set default Finder location to home folder (~/)
defaults write com.apple.finder NewWindowTarget -string "PfLo" && \
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}"

# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1

Shell

Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# add to .zshrc/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
# Install homebrew packages
brew install \
wget \
zsh \
git \
git-flow-avh \
tree \
ssh-copy-id \
jpegoptim \
pngcrush \
colordiff \
imagemagick \
graphicsmagick \
ack \
caskroom/cask/brew-cask \
rbenv \
node \
tig \
ruby-build \
mackup \
carthage 

oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# zsh plugin
https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

Ruby

rbenv install 3.0.1
rbenv global 3.0.1
# add to .zshrc/.zprofile
eval "$(rbenv init -)"

iOS

# tailor need java
brew cask install java

brew install \
swiftgen \
swiftlint \
xctool \
tailor

# build tool
gem install cocoapods fastlane

# plugin
curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh

Install http://vim.spf13.com

Homebrew Cask Apps & Fonts

# Install fonts
font-source-code-pro
font-source-han-sans
font-fira-code

Set hostname

sudo scutil --set HostName Wanedd

Git

# Creates a new ssh key
# ssh-keygen -t rsa -b 4096 -C "me@gmail.com"

# Copy ssh key to clipboard for adding to github.com
pbcopy < ~/.ssh/id_rsa.pub

# Test connection
ssh -T git@github.com

# Set git config values
git config --global color.ui true && \
git config --global push.default simple && \
git config --global alias.co checkout && \
git config --global alias.ci commit -v&& \
git config --global alias.st status && \
git config --global alias.br branch && \
git config --global alias.ll "log --stat" && \
git config --global alias.lp "log --pretty=oneline --abbrev-commit --decorate --graph"
mackup restore

iTerm2

# Install Tomorrow Night Eighties theme for iTerm2
wget https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Tomorrow%20Night%20Eighties.itermcolors \
-O ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors && open ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors
wget https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Tomorrow%20Night.itermcolors \
-O ~/Downloads/Tomorrow\ Night.itermcolors

Squirrel Input Setting

ln -s Dropbox/default.custom.yaml ~/Library/Rime/.
ln -s Dropbox/squirrel.custom.yaml ~/Library/Rime/.

Install xcode color plugin

  1. https://github.com/ViccAlexander/Chameleon#storyboard-add-on
  2. https://bjango.com/mac/skalacolor/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment