~/.profile

alias ll="ls -l"

# Display active git branch in bash prompt
# http://gregk.me/2011/display-active-git-branch-in-bash-prompt/
PS1="\u@\h:\w\$(git branch 2>/dev/null | grep -e '\* ' | sed 's/^..\(.*\)/ (\1)/') \$ "

Geospatial Data Abstraction Library (GDAL)

GDAL in docker

  • geodata/gdal
  • docker pull roblabs/gdal
  • docker run -v $(pwd):/data roblabs/gdal ogr2ogr
  • docker run -v $(pwd):/data roblabs/gdal gdalwarp
  • docker run -v $(pwd):/data roblabs/gdal gdal_translate
  • docker run -v $(pwd):/data roblabs/gdal gdal2tiles.py
  • docker run -v $(pwd):/data roblabs/gdal gdalinfo test.tif

Python modules

  • pip
    • https://pip.pypa.io/en/stable/installing/
    • curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    • python get-pip.py --user
  • mb-utilsudo easy_install mbutil
  • rasteriosudo pip install rasterio
  • mapboxclipip install --user mapboxcli
    • You’ll then need to include ~/.local/bin in your $PATH, export PATH=~/.local/bin:$PATH

Brew modules

  • https://brew.sh/ - The missing package manager for macOS
  • tippecanoe - brew install tippecanoe
  • ImageMagick - brew install ImageMagick
  • webp - brew install webp
  • wget - brew install wget
  • mapbox command line interface - brew install mapbox/cli/mapbox
  • aws - brew install awscli
  • brew tap osgeo/osgeo4mac - brew install gdal2-pdf brew install gdal2-python
  • tree - brew install tree — tree -f .
    tree -f . -L 1
    .
    ├── ./Desktop
    ├── ./Documents
    ├── ./Downloads
    ├── ./Library
    ├── ./Movies
    ├── ./Music
    ├── ./Pictures
    ├── ./Public
    

For Open Map Tiles

brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt
brew install md5sha1sum  # md5sum
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.profile

Ruby & Gem

Solve all your macOS gem install problems with notes from https://stackoverflow.com/a/32253142

  • echo "gem: --user-install -n/usr/local/bin" >> ~/.gemrc
  • gem install xcpretty

Node

  • Node.js, which installs node and npm

json

csvjson

gifify

  • npm install -g gifify
  • gifify pct.mov -o pct.gif
  • gifify pct.mov -o pct.gif --from 45 --to 50 --speed 2 --resize 640:-1
  • docker - docker run -it --rm -v $(pwd):/data maxogden/gifify pct.mov -o pct.gif

geojson-random

geojson-random 3
geojson-random 3 > a.json
geojson-random 3 > b.json

geojsonio

geojsonio a.json
geojson-random 100 | geojsonio

geojson-merge

geojson-merge a.json b.json

geojson-precision

geojson-random 3 > a.json
geojson-precision a.json b.json

join-json

echo { \"id\" : 3 } > a.json
geojson-random 3 > b.json
join-json -i a.json -i b.json -o out.json -f

geojsonhint

geojson-join

geojson-join test/against.json \
    --againstField=id \
    --geojsonField=id < test/random.geojson

jsontogeojson

d3 tools from mbostock

shp2json

ndjson

d3-dsv

Web servers

  • jekyllalias j='docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll -it -p 127.0.0.1:4000:4000 jekyll/jekyll:pages jekyll serve'

Editors

  • atom
    • apm install pretty-json
    • apm install markdown-image-assistant
    • apm install nuclide
      # Open up keymap editor in Atom
      # atom ~/.atom/keymap.cson
      'atom-text-editor':
        'shift-cmd-p': 'pretty-json:prettify'
        'shift-cmd-m': 'pretty-json:minify'
      

macOS

Finder

  • Show Hidden Files & Folders in Finder
    • defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
  • Change folder of where Screenshots are saved, instead of Desktop
    • Shift-Command (⌘)-3 for entire screen
    • Shift-Command (⌘)-4 for a selected portion
    • defaults write com.apple.screencapture location ~/Downloads
    • killall SystemUIServer

Xcode

  • Explicitly set to Xcode, in case you have a Beta installed sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
  • xcode-select -print-path

  • Edit this file