# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
#Disable ext change warning
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
#Use current directory as default search scope in Finder
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
#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
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
#You'll be able to install any app you want from here on, not just Mac App Store apps
sudo spctl --master-disable
sudo defaults write /var/db/SystemPolicy-prefs.plist enabled -string no
defaults write com.apple.LaunchServices LSQuarantine -bool false
#Set the Dock to auto-hide"
defaults write com.apple.dock autohide -bool true
#Disable backswipe in Chrome
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
#fix spotlights privacy settings
#https://fix-macosx.com/
curl -fsSL https://gist.githubusercontent.com/dalekunce/86218853b4bd8516a675/raw/fix-macosx.py
####Set hostname
#mercator is a crappy projection but a good computer name
sudo scutil --set HostName mercator
###Shell
###Xcode command line tools
xcode-select --install
####Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git gist git-flow wget colordiff imagemagick python bash-completion
####Switch to zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
####Configure .zshrc
git clone git://github.com/powerline/fonts.git ~/fonts
cd ~/fonts && ./install.sh
rm -r ~/fonts
wget https://gist.githubusercontent.com/dalekunce/88f410c32fe6061767cb/raw/.zshrc -O ~/.zshrc
wget https://gist.githubusercontent.com/dalekunce/4c4cdf8adeadee112e18/raw/dale.zsh-theme -O ~/.oh-my-zsh/themes/remy.zsh-theme
#syntax highlighting
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
###Git
####Setup Github
ssh-keygen -t rsa -C "[email protected]"
#copy ssh key to github.com
cat ~/.ssh/id_rsa.pub
#test connection
ssh -T [email protected]
#set git config values
git config --global user.name "Dale Kunce" &&
git config --global user.email "[email protected]" &&
git config --global github.user dalekunce &&
git config --global core.editor "atom" &&
git config --global color.ui true
#token
git config --global github.token your_token_here
#github dir
mkdir ~/git
###Install MacApps
#install brew cask
brew install caskroom/cask/brew-cask
#set the app directory
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
#java
brew cask install java
#atom text editor
brew cask install atom
#chrome
brew cask install google-chrome
#creative cloud and reader
brew cask install adobe-creative-cloud
brew cask install adobe-reader
#xquartz for xwindows stuff
brew cask install xquartz
#gimp for simple photo stuff
brew cask install gimp
#avast antivirus
brew cask install avast
#cyberduck for ftp and s3
brew cask install cyberduck
#google refine for big data analysis
brew cask install google-refine
#virtualbox for virtual machines
brew cask install virtualbox
#slack for team communication
brew cask install slack
#skype for more communication
brew cask install skype
#flux so you go to sleep at night
brew cask install flux
#spectacle for keyboard shortcuts for window management
brew cask install spectacle
#keka for unziping 7z files
brew cask install keka
#filesharing gdrive and dropbox
brew cask install google-drive
brew cask install dropbox
#switch to iterm2
brew cask install iterm2
#sometimes msoffice is terrible
brew cask install libreoffice
brew install node bower wiredep forever turf topojson
#install postgres and postgis using one brew formula
brew install postgis
#setup database
#https://gist.github.com/dalekunce/9979082
#pgadmin3 for db administration
brew cask install pgadmin3
#osmosis for OSM stuff
brew install osmosis
#protobuf-c and osm2pgsql to import osm files to postgis
brew install protobuf-c osm2pgsql
#python dependencies for QGIS
pip install Shapely numpy scipy matplotlib psycopg2
#install qgis and dependencies including gdal, gdal-filedb for esri, and orfeo-42 for image manipultion
brew tap osgeo/osgeo4mac
brew install gdal qgis-28 orfeo-42
#mapnik
brew install mapnik --with-gdal --with-postgresql
#chubbs
#https://github.com/spatialdev/PGRestAPI/blob/master/docs/OSX_Install.md
cd ~/git
git clone https://github.com/spatialdev/PGRestAPI.git
cd PGRestAPI
sudo npm install
#esri file-gdb support
brew install gdal-fileGdb
wget http://downloads2.esri.com/Software/FileGDB_API_1_3-64.zip -O /Library/Caches/Homebrew/FileGDB_API_1_3-64.zip
export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins
#install josm
brew cask install josm
#install google earth
brew cask install google-earth
#mapbox landsat-util
#https://github.com/developmentseed/landsat-util
brew install https://raw.githubusercontent.com/developmentseed/landsat-util/master/Formula/landsat-util.rb
#mapbox studio
brew cask install mapbox-studio
#link the brew installed apps
brew linkapps
brew cleanup --force
rm -f -r /Library/Caches/Homebrew/*