Skip to content

Instantly share code, notes, and snippets.



Last active Apr 8, 2020
What would you like to do?
This is a shell script I use to bootstrap new dev machines (OSX) and servers (Ubuntu). It will ensure everything I need for python, node.js, and git is installed. After running bootstrap, I just need to clone my project and run the initialization script in my project to complete the setup.
# expects python is installed with OS distribution
# single line command for execution
# wget -O - <RAW_URL> | bash
# determine environment
if hash apt-get 2>/dev/null; then
echo "Bootstrapping UBUNTU"
# update apt-get and install a C compiler
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt-get -y install gcc
echo "Bootstrapping OSX"
# on OSX we use brew as the application repo
ruby -e "$(curl -fsSkL"
brew doctor
# install python, when necessary
if [ $UBUNTU ]; then
sudo apt-get -y install python-dev python-setuptools
# setup pip, virtualenv, and virtualenvwrapper
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
mkdir $HOME/.virtualenvs
# install git
if [ $UBUNTU ]; then
sudo apt-get -y install git
if [ $OSX ]; then
brew install git
# install node and npm
if [ $UBUNTU ]; then
sudo apt-get -y install nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
if [ $OSX ]; then
brew install node npm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.