tomichj / laptop

A script to configure my OS X laptop for web development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laptop

Laptop is a script to configure my OS X laptop for ruby development.

Much of this script comes from thoughtbot/laptop, thanks guys!

You can safely run this multiple times on the same laptop.

Install

Download and review the script, or execute the script right from github like so:

bash <(curl -s https://raw.githubusercontent.com/tomichj/laptop/master/mac)

Optionally, install tomichj/dotfiles.

What it sets up

A mac with a minimal configuration for Ruby and Rails development.

macOS package management:

Unix command line utilities:

Git tools:

  • git the git distributed revision control system
  • hub add GitHub support to git on the command-line
  • sourcetree a visual git client
  • github desktop github's visual git client
  • diffmerge visually compare and merge files

Ruby dev environment:

  • rbenv Ruby version manager
  • ruby-build Install various Ruby versions and implementations
  • puma-dev A tool to manage rack apps in development with puma
  • heroku/brew/heroku Everything you need to get started with Heroku
  • ngrok Public URLs for exposing your local resources (web servers, etc)

Browsers:

Databases and tools:

  • postgres a full-featured PostgreSQL installation packaged as a standard Mac app.
  • redis-app a redis installation packages as a standard Mac app.
  • postico a Postgres client

Latest ruby:

  • rbenv and ruby-build are used to install the latest version of Ruby
  • rbenv is configured to use this version of ruby
  • Bundler is then installed and configured in the just-installed ruby

Bash:

  • The latest version of bash is installed and added to /etc/shells
  • Your shell is switched to bash

Customize in ~/.laptop.local

Your ~/.laptop.local is run at the end of the Laptop script. Put your customizations there. For example:

#!/bin/sh

brew bundle --file=- <<EOF
brew "Caskroom/cask/dockertoolbox"
brew "go"
brew "ngrok"
brew "watch"
EOF

default_docker_machine() {
  docker-machine ls | grep -Fq "default"
}

if ! default_docker_machine; then
  docker-machine create --driver virtualbox default
fi

default_docker_machine_running() {
  default_docker_machine | grep -Fq "Running"
}

if ! default_docker_machine_running; then
  docker-machine start default
fi

fancy_echo "Cleaning up old Homebrew formulae ..."
brew cleanup
brew cask cleanup

if [ -r "$HOME/.rcrc" ]; then
  fancy_echo "Updating dotfiles ..."
  rcup
fi

Write your customizations such that they can be run safely more than once. See the mac script for examples.

Laptop functions such as fancy_echo and gem_install_or_update can be used in your ~/.laptop.local.

See the wiki for more customization examples.

License

© 2016-2019 Justin Tomich © 2011-2015 thoughtbot, inc.

It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

A script to configure my OS X laptop for web development

License:MIT License


Languages

Language:Shell 100.0%