Skip to content

Instantly share code, notes, and snippets.

@achavez
Last active July 11, 2019 14:52
Show Gist options
  • Save achavez/6590097dbaf9339a6274 to your computer and use it in GitHub Desktop.
Save achavez/6590097dbaf9339a6274 to your computer and use it in GitHub Desktop.
Development machine setup

Prerequisites

  1. Run all of the OS updates that are available
  2. Install Homebrew and tap the casks we'll need (brew tap homebrew/cask-fonts, brew tap homebrew/cask-versions)

Shell setup

  • install ZSH - brew install zsh
  • set ZSH as the default shell by 1) adding the output of which zsh to /etc/shells and 2) changing the default shell with chsh -s $(which zsh)
  • add autocompletion to ZSH brew install zsh-autosuggestions (be sure to follow the instructions output by brew to update your ~/.zshrc)
  • later, after installing Node install a cool command prompt like spaceship (more here) - npm install -g spaceship-prompt

Terminal setup

  • install iTerm2 - brew cask install iterm2
  • install Powerline-ed font (such as FiraCode) - brew cask install font-fira-code
  • set a color scheme (see https://iterm2colorschemes.com for some options) and tweak the font in the iTerm preferences

Editor setup

  • Install Atom - brew cask install atom
  • Customize Atom themes - apm install seti-ui monokai-seti
  • Add some key core packages with apm install atom-beautify linter. The linter package is a base linter toolkit that we'll add to later as we install tools for additional languages.

Apps

Downloads:

From the app store:

(you can install these with mas if you brew install mas)

JavaScript dev tools

  • add NVM to manage mulptiple Node versions - brew install nvm
  • then use it to install the latest version of Node - nvm install node
  • then add the related tools to Atom apm install linter-eslint autocomplete-modules
  • install other JavaScript global dev tools - ex: npm install -g gulp-cli

Python dev tools

Other misc. tools

  • a few other niceties: httpie (brew install httpie), duck (brew install duck)
  • brew install fpp for the Facebook Path Picker, which makes running CLI commands on many files much easier
  • brew install bat for the an improved versin of cat
  • brew install m-cli for the m CLI for OS X

PHP dev tools

  • install the latest PHP brew install homebrew/php/56
  • update your PATH to user the updated Homebrew PHP by adding export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH" to your ~/.zshrc; verify that it worked by running which php or php -v
  • install Composer brew install homebrew/php/composer

Bash scripting tools

  • install shellcheck - brew install shellcheck
  • add shellcheck linting to Atom - apm install linter-shellcheck

Geo tools

  • QGIS - brew cask install qgis (may require brew cask install gdal-framework, even if GDAL is already installed elsewhere)
  • GeoDa - http://geodacenter.github.io/

Stats tools

  • R - brew install r
  • R Studio - brew cask install rstudio
  • PSPP - brew tap homebrew-science && brew install pspp
  • Add R support to Atom - apm install language-r
  • Add the R Kernel to Jupyter - https://irkernel.github.io/installation/

Databases

You have two options here, when it comes to PostgresSQL. I'm currently using Option 1, but will leave Option 2 here because if you want to go that route the pin-ing of the formula is essential.

1) Use Postgres.app:

  • brew cask install postgres to get the app
  • You'll almost certainly then want to add its CLI tools to your $PATH. Doing that, however, will cause Postgres.app's *-config files to show up in your $PATH while using Homebrew, which can create issues. To fix that, you can use something like the below:
    export PATH_WITHOUT_POSTGRESAPP=$PATH  # stash the PATH w/o Postgres.app for use in brew() below
    export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"  # adds CLI tools from Postgres.app to the default PATH
    
    # Add a brew alias that excludes Postgres.app's bin dir from its $PATH to suppress
    # *-config files from polluting brew installs
    brew() {
        export PATH=$PATH_WITHOUT_POSTGRESAPP
        command brew "$@"
        export PATH=$PATH
    }

2) Install using Homebrew

  • brew install postgres for the latest version of PostgreSQL; you should also pin Postgres (brew pin postgres) to avoid accidental upgrades, which could lead to your data directory being destroyed during a brew cleanup
  • brew install postgis (also a good idea to pin this)

Media editing

  • brew cask install inkscape for working with SVG files

Parsers/handlers for our favorite (and least favorite) file formats

PDF

  • brew install poppler to get pdftotext, pdfinfo, pdfimages, etc. (this'll give you an updated, more full-featured version of what you'd get from brew install xpdf)
  • gpip install pdfplumber for Jeremy Singer-Vine's PDF mining library
  • brew install tesseract to get Tesseract OCR tool
  • install prerequisites, then gem install docsplit to get DocumentCloud's text-/image-extractor
  • for OCRmyPDF, an all-in-one OCR and PDF cleanup solution, brew install ocrmypdf.

CSV/XLS/etc.

  • install csvkit with gpip install csvkit
  • brew install xsv to install XSV, a faster-than-CSVkit CSV processor
  • gpip install chardet for an encoding detector CLI
  • gpip install xlsx2csv for Excel to CSV conversion
  • for CSV deduplication, you may also want to have https://github.com/dedupeio/csvdedupe
  • this is promising, but I'm not 100% sure of the best way to install ... https://github.com/theodi/csvlint.rb/

JSON

  • brew install jq to get the jq JSON-parsing/-streaming CLI

MDB

  • brew install mdbtools for an exporter, SQL engine for MS Access/.mdb files

PST/MBOX/MSGetc.

Documents

Archives

  • brew install p7zip for the 7z CLI for working with all sorts of archive formats, including some that tar and zip struggle with

Any text file

  • brew install dos2unix for dos2unix, which converts line endings to/from UNIX format
  • brew install bat for a cat replacement with syntax highlighting and less-like scrolling

A couple of productivity tools

  • Dash (brew cask install dash); open Dash and install some docsets for commonly-used libraries
  • open Alfred and install some customw workflows (see here for a great list)

Web development

  • for sharing localhost with the world - npm install -g localtunnel or brew cask install ngrok

Misc.

  • brew cask install licecap for screencaps
  • brew cask install gas-mask for host-file editing
  • brew cask install bitbar for all sorts of cool menu bar trinkets
  • you'll need to generate a new public key and add it to Github and Heroku
  • before committing with git you'll want to setup your name and e-mail git config --global --edit and push strategy (I use git config --global push.default matching)
  • see Flux and AntiRSI
  • see BlockBlock and other Objective-See apps https://objective-see.com/products.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment