Skip to content

Instantly share code, notes, and snippets.

@pkrawc pkrawc/.osx
Last active May 16, 2017

What would you like to do?
Steps For Setting Ip a Design-y Development Environment on MacOs Sierra
sudo -v
# Disable the “Are you sure you want to open this application?” dialog
defaults write LSQuarantine -bool false
# Remove the sleep image file to save disk space
sudo rm /private/var/vm/sleepimage
# Create a zero-byte file instead…
sudo touch /private/var/vm/sleepimage
# …and make sure it can’t be rewritten
sudo chflags uchg /private/var/vm/sleepimage
# Disable the sudden motion sensor as it’s not useful for SSDs
sudo pmset -a sms 0
# Trackpad: enable tap to click for this user and for the login screen
defaults write Clicking -bool true
defaults -currentHost write NSGlobalDomain -int 1
defaults write NSGlobalDomain -int 1
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -float 0.000000000001
# Require password immediately after sleep or screen saver begins
defaults write askForPassword -int 1
defaults write askForPasswordDelay -int 0
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write type -string "png"
# Disable shadow in screenshots
defaults write disable-shadow -bool true
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# Enable HiDPI display modes (requires restart)
sudo defaults write /Library/Preferences/ DisplayResolutionEnabled -bool true
# Finder: show hidden files by default
defaults write AppleShowAllFiles -bool true
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write FXPreferredViewStyle -string "Nlsv"
# Remove Dropbox’s green checkmark icons in Finder
[ -e "${file}" ] && mv -f "${file}" "${file}.bak"
# Privacy: don’t send search queries to Apple
defaults write UniversalSearchEnabled -bool false
defaults write SuppressSearchSuggestions -bool true
# Prevent Photos from opening automatically when devices are plugged in
defaults -currentHost write disableHotPlug -bool true
# Disable the all too sensitive backswipe on trackpads Chrome
defaults write AppleEnableSwipeNavigateWithScrolls -bool false
defaults write AppleEnableSwipeNavigateWithScrolls -bool false
for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \
"Dock" "Finder" "Google Chrome" "Google Chrome Canary" "Mail" "Messages" \
"Opera" "Photos" "Safari" "SizeUp" "Spectacle" "SystemUIServer" "Terminal" \
"Transmission" "Tweetbot" "Twitter" "iCal"; do
killall "${app}" &> /dev/null
echo "Done. Note that some of these changes require a logout/restart to take effect."
#!/usr/bin/env bash
echo "ask for sudo cause we'll probably need it down the line"
sudo -v
ruby -e "$(curl -fsSL"
# Install caskroom and some other basic tooling I love
brew doctor
brew tap caskroom/cask
brew install git node yarn brew-cask
brew tap caskroom/versions
# Install postgres because its hands over fist better than sqlite or mysql
brew install postgresql
brew services start postgresql
createuser -s -r postgres
brew install redis
brew services start redis
# Get ready to install rvm, ruby, rails, and upgrade our ruby version
echo "gem: --no-document" >> ~/.gemrc
curl -L | bash -s stable --auto-dotfiles --autolibs=enable --rails
# Setup a github rsa key pair & saves it into clipboard to transfer it to
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
pbcopy < ~/.ssh/
# Install some global javascript utilities
yarn add -g create-react-app svgo nodemon live-server
# Install some apps for playing stuff all nice like
brew cask install caskroom/versions/google-chrome-beta atom spotify dropbox vlc flux daisydisk sketch slack transmission gitscout iconjar
# Source the osx defaults. This is last because it'll probably require a restart.
source ./.osx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.