Skip to content

Instantly share code, notes, and snippets.

@dalekunce
Last active July 29, 2023 22:18
Show Gist options
  • Save dalekunce/0e6f7bfe8445ff3cc3dc to your computer and use it in GitHub Desktop.
Save dalekunce/0e6f7bfe8445ff3cc3dc to your computer and use it in GitHub Desktop.
Yosemite GIS Machine Setup

Mac OS X GIS Setup

OS X Preferences


# 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

#stop photos from starting
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true

####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 https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

#add the key to ssh-agent so you don't have to always type your password
eval "$(ssh-agent -s)"

#edit ~/.ssh/config on 10.12.2 or higher
vi ~/.ssh/config
Host *
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/id_rsa
#add the key to the agent
ssh-add -K ~/.ssh/id_rsa

#copy ssh key to github.com
pbcopy < ~/.ssh/id_rsa.pub

#test connection
ssh -T git@github.com

#set git config values
git config --global user.name "Dale Kunce" &&
git config --global user.email "dale@normalhabit.com" &&
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

#os-x-keychain
git config --global credential.helper osxkeychain

#github dir
mkdir ~/git

###Install MacApps


#install brew cask 
brew tap caskroom/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 install duck
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

Node


brew install node nvm
npm install -g bower wiredep forever turf topojson

GIS Stuff


#install pip for easy install stuff
sudo easy_install pip

#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

#protobuf-c and osm2pgsql to import osm files to postgis
brew install protobuf-c osm2pgsql

#python dependencies for QGIS
brew install python3
brew install pkg-config freetype
pip3 install numpy matplotlib 

#install qgis and dependencies including gdal, gdal-filedb for esri, and orfeo-42 for image manipultion
brew tap osgeo/osgeo4mac
brew install gdal qgis

#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
pip install landsat-util

#link the brew installed apps
brew linkapps

cleanup

brew cleanup --force
rm -f -r /Library/Caches/Homebrew/*
@rbanick
Copy link

rbanick commented Aug 28, 2015

Gdal needs to be installed --with-postgresql to perform ogr2ogr operation on PostGIS databases

brew install gdal --with-postgresl

See http://gis.stackexchange.com/questions/33346/how-can-i-update-ogr2ogr-to-include-the-postgresql-driver for more details

@jnicho02
Copy link

jnicho02 commented Jul 12, 2017

my brew install gdal-mrsid just asked for http://bin.lizardtech.com/download/developer/MrSID_DSDK-9.5.1.4427-darwin14.universal.clang60.tar.gz

...and should it go in ~/Library/Caches/Homebrew instead of /Library/Caches/Homebrew ? (i'm on macOS Sierra 10.12.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment