Skip to content

Instantly share code, notes, and snippets.

@siuying
Forked from hlb/Brewfile
Last active November 20, 2023 15:13
Show Gist options
  • Save siuying/4730063ba53de22991c2809312fad871 to your computer and use it in GitHub Desktop.
Save siuying/4730063ba53de22991c2809312fad871 to your computer and use it in GitHub Desktop.
Clean Install Script
cask_args appdir: '/Applications'
tap 'homebrew/cask'
tap "homebrew/cask-fonts"
tap 'homebrew/cask-versions'
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/services"
brew "git"
brew "git-lfs"
brew "python3"
brew "ssh-copy-id"
brew "wget"
brew "asciinema"
brew "mas"
brew "miniconda"
cask '1password'
cask 'quip'
cask 'dropbox'
cask 'firefox'
cask 'slack'
cask "font-fira-code"
cask "font-noto-sans-cjk"
cask "font-source-code-pro"
cask "font-sourcecodepro-nerd-font"
cask "tower"
cask "notion"
cask "visual-studio-code"
cask "webex"
cask "logseq"

System Preferences

check set-system-preferences.sh

Install Software

Softwares should be controlled by brew. Install homebrew http://brew.sh

brew install mas

Install xcode:

mas install 497799835
sudo xcodebuild -license accept
xcode-select --install

Put Brewfile in the folder and run:

brew bundle

Setup Hostname (Be sure to change hostname to yours)

sudo scutil --set HostName kelon

Setup Git (Be sure to change email and name to yours)

# Creates a new ssh key
ssh-keygen -t rsa -b 4096 -C "your-email@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 user.name "your-name" && \
git config --global user.email "your-email@gmail.com" && \
git config --global github.user your-username && \
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"
#!/bin/bash
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment