Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcm, brew bundle and a better .dots #83

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

# DESCRIPTION:
#
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/android
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cask_args appdir: "/Applications"

brew "android-sdk"

cask "java"
cask "intellij-idea-ce"
cask "android-studio"

1 change: 1 addition & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/aws
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew "apache-spark"
3 changes: 3 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tap "thoughtbot/formulae"

brew "rcm"
11 changes: 11 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/datastores
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cask_args appdir: "/Applications"

# Install data stores
brew "mysql"
brew "postgresql"
brew "mongo"
brew "redis"
brew "elasticsearch"

# Install mysql workbench
cask "mysqlworkbench"
147 changes: 147 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/essentials
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
cask_args appdir: "/Applications"

tap "homebrew/versions"
tap "bramstein/webfonttools"

brew "coreutils"

# Install some other useful utilities like `sponge`.
brew "moreutils"

# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed.
brew "findutils"

# Install GNU `sed`, overwriting the built-in `sed`.
brew "gnu-sed", args: ["with-default-names"]

# Install Bash 4.
brew "bash"

brew "bash-completion2"

# Install `wget` with IRI support.
brew "wget", args: ["with-iri"]

# Install RingoJS and Narwhal.
# Note that the order in which these are installed is important;
# see http://git.io/brew-narwhal-ringo.
brew "ringojs"
brew "narwhal"

# Install Python
brew "python"
brew "python3"

# Install ruby-build and rbenv
brew "ruby-build"
brew "rbenv"

# Install more recent versions of some OS X tools.
brew "vim", args: ["override-system-vi"]
brew "homebrew/dupes/grep"
brew "homebrew/dupes/openssh"
brew "homebrew/dupes/screen"
brew "homebrew/php/php55", args: ["with-gmp"]

# Install font tools.

brew "sfnt2woff"
brew "sfnt2woff-zopfli"
brew "woff2"

# Install some CTF tools; see https://github.com/ctfs/write-ups.
brew "aircrack-ng"
brew "bfg"
brew "binutils"
brew "binwalk"
brew "cifer"
brew "dex2jar"
brew "dns2tcp"
brew "fcrackzip"
brew "foremost"
brew "hashpump"
brew "hydra"
brew "john"
brew "knock"
brew "netpbm"
brew "nmap"
brew "pngcheck"
brew "socat"
brew "sqlmap"
brew "tcpflow"
brew "tcpreplay"
brew "tcptrace"
brew "ucspi-tcp" # `tcpserver` etc.
brew "homebrew/x11/xpdf"
brew "xz"

# Install other useful binaries.
brew "ack"
brew "dark-mode"
#brew "exiv2"
brew "git"
brew "git-lfs"
brew "git-flow"
brew "git-extras"
brew "hub"
brew "imagemagick", args: ["with-webp"]
brew "lua"
brew "lynx"
brew "p7zip"
brew "pigz"
brew "pv"
brew "rename"
brew "rhino"
brew "speedtest_cli"
brew "ssh-copy-id"
brew "tree"
brew "webkit2png"
brew "zopfli"
brew "pkg-config libffi"
brew "pandoc"

# Lxml and Libxslt
brew "libxml2"
brew "libxslt"

# Install Heroku
brew "heroku-toolbelt"

# Core casks
cask "alfred"
cask "iterm2"
cask "java"
cask "xquartz"

# Development tool casks
cask "sublime-text"
cask "atom"
cask "virtualbox"
cask "vagrant"
cask "macdown"

# Misc casks
cask "google-chrome"
cask "firefox"
cask "skype"
cask "slack"
cask "dropbox"
cask "evernote"
cask "1password"
#cask "gimp"
#cask "inkscape

# Install Docker, which requires virtualbox
brew "docker"
brew "boot2docker"

# Install developer friendly quick look plugins; see https://github.com/sindresorhus/quick-look-plugins
cask "qlcolorcode"
cask "qlstephen"
cask "qlmarkdown"
cask "quicklook-json"
cask "qlimagesize"
cask "webpquicklook"
cask "suspicious-package"
cask "quicklookase"
cask "qlvideo"
1 change: 1 addition & 0 deletions .dotfiles/tag-dev-setup/dev-setup/brewfiles/web
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew "node"
10 changes: 10 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/modules/android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "------------------------------"
echo "Setting up Android development environment."
echo "------------------------------"
echo ""

brew bundle install --file="${SCRIPT_DIR}/../brewfiles/android"
28 changes: 8 additions & 20 deletions aws.sh → ...es/tag-dev-setup/dev-setup/modules/aws.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
#!/bin/bash

# ~/aws.sh
readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Removed user's cached credentials
# This script might be run with .dots, which uses elevated privileges
sudo -K
echo "------------------------------"
echo "Setting up AWS development environment."
echo "------------------------------"
echo ""

echo "------------------------------"
echo "Setting up AWS."
Expand Down Expand Up @@ -72,17 +73,7 @@ pip install awscli
# System-Wide Packages #
###############################################################################

# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

# Make sure we’re using the latest Homebrew.
brew update

brew install apache-spark
brew bundle install --file="${SCRIPT_DIR}/../brewfiles/aws"

###############################################################################
# Install IPython Notebook Spark Integration
Expand All @@ -91,9 +82,6 @@ brew install apache-spark
echo "------------------------------"
echo "Installing IPython Notebook Spark integration"

# Add the pyspark IPython profile
cp -r init/profile_pyspark/ ~/.ipython/profile_pyspark

BASH_PROFILE_PATH=~/.bash_profile
echo $BASH_PROFILE_PATH
echo "" >> $BASH_PROFILE_PATH
Expand All @@ -110,4 +98,4 @@ echo "------------------------------"
echo "TODO: Update .aws/ with your AWS credentials and region, or run aws --configure."
echo "TODO: Update .mrjob.conf with your credentials, keypair, keypair location, region, and bucket info."
echo "TODO: Update .s3cfg with your credentials, location, and passphrase or run s3cmd --configure."
echo "Script completed."
echo "Script completed."
31 changes: 31 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/modules/base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ $(command -v brew) == "" ]]; then
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "Updating homebrew..."
brew update
fi


if [[ $(command -v rcup) == "" ]]; then

echo "------------------------------"
echo "Installing rcm suite"

brew bundle install --file="${SCRIPT_DIR}/../brewfiles/base"
fi


echo "------------------------------"
echo "Updating and/or installing dotfiles"
echo "------------------------------"

# Update and/or install dotfiles. These dotfiles are stored in the .dotfiles directory.
# rcup is used to install files from the tag-specific dotfiles directory.
# rcup is part of rcm, a management suite for dotfiles
# Check https://github.com/thoughtbot/rcm for more info
env RCRC=".rcrc" rcup
10 changes: 10 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/modules/datastores.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "------------------------------"
echo "Setting up data stores."
echo "------------------------------"
echo ""

brew bundle install --file="${SCRIPT_DIR}/../brewfiles/datastores"
37 changes: 37 additions & 0 deletions .dotfiles/tag-dev-setup/dev-setup/modules/essentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Run the core.sh Script
# For a full listing of installed formulae and apps, refer to
# the commented core.sh source file directly and tweak it to
# suit your needs.

echo "------------------------------"
echo "Installing essential homebrew formulae and apps."
echo "This might awhile to complete, as some formulae need to be installed from source."
echo "------------------------------"
echo ""

brew bundle install --file="${SCRIPT_DIR}/../brewfiles/essentials"

# GNU core utilities (those that come with OS X are outdated).
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum

# We installed the new shell, now we have to activate it
echo "Adding the newly installed shell to the list of allowed shells"
# Prompts for password
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
# Change to the new shell, prompts for password
chsh -s /usr/local/bin/bash

LINE='eval "$(rbenv init -)"'
grep -q "$LINE" ~/.extra || echo "$LINE" >> ~/.extra

# Lxml and Libxslt
brew link libxml2 --force
brew link libxslt --force

# Heroku
heroku update
32 changes: 22 additions & 10 deletions osx.sh → .../tag-dev-setup/dev-setup/modules/macos.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
#!/usr/bin/env bash
#!/bin/bash

if [[ "${EUID}" -ne 0 ]]; then
echo "This module requires sudo rights."
echo "You should run this module using the dev-setup script in your home directory."
exit 1
fi

# Run the osx.sh Script
# I strongly suggest you read through the commented osx.sh
# source file and tweak any settings based on your personal
# preferences. The script defaults are intended for you to
# customize. For example, if you are not running an SSD you
# might want to change some of the settings listed in the
# SSD section.
echo "------------------------------"
echo "Setting sensible macos defaults."
echo "------------------------------"
echo ""

# ~/osx.sh — Originally from https://mths.be/osx

# Ask for the administrator password upfront
sudo -v

# Keep-alive: update existing `sudo` time stamp until `osx.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

###############################################################################
# General UI/UX #
###############################################################################
Expand Down Expand Up @@ -586,7 +598,7 @@ tell application "Terminal"
(* Open the custom theme so that it gets added to the list
of available terminal themes (note: this will open two
additional terminal windows). *)
do shell script "open '$HOME/init/" & themeName & ".terminal'"
do shell script "open '$HOME/.dev-setup/themes/" & themeName & ".terminal'"

(* Wait a little bit to ensure that the custom theme is added. *)
delay 1
Expand Down Expand Up @@ -640,7 +652,7 @@ start_if_needed() {

# Install the Solarized Dark theme for iTerm
start_if_needed iTerm
open "${HOME}/init/Solarized Dark.itermcolors"
open "${HOME}/.dev-setup/themes/Solarized Dark.itermcolors"

# Don’t display the annoying prompt when quitting iTerm
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
Expand Down Expand Up @@ -774,7 +786,7 @@ defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false
###############################################################################

# Install Sublime Text settings
cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null
cp -r ${HOME}/.dev-setup/themes/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null

###############################################################################
# Transmission.app #
Expand Down
Loading