Skip to content

Instantly share code, notes, and snippets.

@qdequele
Last active July 11, 2022 08:43
Show Gist options
  • Save qdequele/3109a5a568e3a9ce1717775877321087 to your computer and use it in GitHub Desktop.
Save qdequele/3109a5a568e3a9ce1717775877321087 to your computer and use it in GitHub Desktop.
echo "Installing xcode-stuff"
xcode-select --install
echo "Install Brew"
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
brew update
echo "Install Brew packages"
brew install node
brew install wget
brew install yarn
brew install htop
brew install bat
brew install exa
brew install fd
brew install jq
brew install git
brew install zsh-syntax-highlighting
brew install dockutil
brew install mas
brew install tealdeer
brew install ripgrep
brew install meilisearch
echo "Install Brew Cask Applications"
brew install --cask 1password
brew install --cask iterm2
brew install --cask firefox
brew install --cask fantastical
brew install --cask whatsapp
brew install --cask daisydisk
brew install --cask telegram
brew install --cask superhuman
brew install --cask slack
brew install --cask discord
brew install --cask deepl
brew install --cask grammarly
brew install --cask raycast
brew install --cask visual-studio-code
brew install --cask docker
brew install --cask zoom
brew install --cask tableplus
brew install --cask gpg-suite
brew install --cask notion
brew install --cask shadow
brew install --cask pitch
brew install --cask figma
brew install --cask postman
# quick look plugins (https://github.com/sindresorhus/quick-look-plugins)
brew install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize suspicious-package apparency quicklookase qlvideo
echo "Install Brew Fonts"
brew tap homebrew/cask-fonts
brew install font-hack
brew install font-montserrat
brew install font-poppins
brew cleanup
echo "Install NPM Packages"
npm install -g prettier
npm install -g eslint
echo "Install Rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo "Configure MacOS"
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "${HOME}/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "jpg"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Disable smart quotes and smart dashes as they are annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Setting trackpad & mouse speed to a reasonable number
defaults write -g com.apple.trackpad.scaling 2
defaults write -g com.apple.mouse.scaling 2.5
# Enabling subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# Disabling the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Use column view in all Finder windows by default
defaults write com.apple.finder FXPreferredViewStyle Clmv
# Avoiding the creation of .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Enabling snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Enabling the secondary click on mouse
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton
# Remove recent applications in dock
defaults write com.apple.dock show-recents -bool false
# Disable Spotlight indexing
sudo mdutil -i off
killall Finder
echo "Configure ZSH"
# Set zsh as defaut shell
chsh -s /bin/zsh
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "Configure Git"
git config --global user.name "qdequele"
git config --global user.email [email protected]
git config --global init.defaultBranch main
echo "Prepare the Dock"
dockutil --remove all
dockutil --add /Applications/Firefox.app
dockutil --add /Applications/Fantastical.app
dockutil --add /Applications/Superhuman.app
dockutil --add /Applications/Slack.app
dockutil --add /Applications/Discord.app
dockutil --add /Applications/Notion.app
dockutil --add /Applications/Pitch.app
dockutil --add /Applications/Figma.app
dockutil --add /Applications/Visual\ Studio\ Code.app
dockutil --add /Applications/Iterm.app
echo "Download all Git Repo"
cd ~
mkdir -p Projects/Meili
cd Project/Meili
GHORG=meilisearch; curl "https://api.github.com/orgs/$GHORG/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment