OS X: Automated provisioning using Homebrew and Cask

I’m changing my hardware quite frequently as I often end up unsatisfied with my current setup. Setting up a computer from scratch is a pain in the a** but restoring a backup implies carrying around configuration files, useless software and other stuff for years. So I’ve decided to create a script that would set up a new computer from scratch and configure it the way I want it to be.