Skip to content

Instantly share code, notes, and snippets.

@Hendrik44
Last active December 9, 2018 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hendrik44/d95546d60f1dd6427a3bc46e3e1e4614 to your computer and use it in GitHub Desktop.
Save Hendrik44/d95546d60f1dd6427a3bc46e3e1e4614 to your computer and use it in GitHub Desktop.
Setup script for one click configuration for OSX
echo "Installing xcode-stuff"
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# update homebrew
echo "Updating homebrew"
brew update
brew upgrade
# install software using homebrew
echo "Install needed libraries via homebrew"
brew install rsync ansible git ruby mkdocs node bfg
# Install iOS-Stuff
brew install ruby carthage cocoapods swiftlint
# Cleanup Homebrew
echo "Cleaning up brew"
brew cleanup
# after fresh osx install just updating ruby gems
echo "Updating and cleanup Ruby Gems"
sudo gem update --system
sudo gem update
sudo gem cleanup
#installing ruby gems
echo "Installing needed Ruby Gems..."
sudo gem install fastlane
# install ohmyzsh
echo "Installing ohmyzsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
exit
# Apps
apps=(
1password
cheatsheet
docker
#filezilla
firefox
google-chrome
little-snitch
macdown
sketch
spotify
sublime-text
skype
sequel-pro
slack
tower2
tunnelblick
vlc
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps with brew Cask..."
brew cask install --appdir="/Applications" ${apps[@]}
brew cask cleanup
brew cleanup
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
#"Saving to disk (not to iCloud) by default"
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -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 3
# Set dragging windows with three fingers via trackpad
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true
#"Showing all filename extensions in Finder by default"
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
#"Avoiding the creation of .DS_Store files on network volumes"
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# show all hidden files by default
defaults write com.apple.finder AppleShowAllFiles TRUE
#"Disable the sudden motion sensor as its not useful for SSDs"
sudo pmset -a sms 0
#"Speeding up wake from sleep to 24 hours from an hour"
# http://www.cultofmac.com/221392/quick-hack-speeds-up-retina-macbooks-wake-from-sleep-os-x-tips/
sudo pmset -a standbydelay 86400
### Sararo
#"Enabling Safari's debug menu"
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Enable the Develop menu and the Web Inspector in Safari
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
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Show the full URL in the address bar (note: this still hides the scheme)
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
killall Finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment