diff --git a/.aliases b/.dotfiles/tag-dev-setup/aliases similarity index 100% rename from .aliases rename to .dotfiles/tag-dev-setup/aliases diff --git a/.aws/config b/.dotfiles/tag-dev-setup/aws/config similarity index 100% rename from .aws/config rename to .dotfiles/tag-dev-setup/aws/config diff --git a/.aws/credentials b/.dotfiles/tag-dev-setup/aws/credentials similarity index 100% rename from .aws/credentials rename to .dotfiles/tag-dev-setup/aws/credentials diff --git a/.bash_profile b/.dotfiles/tag-dev-setup/bash_profile similarity index 100% rename from .bash_profile rename to .dotfiles/tag-dev-setup/bash_profile diff --git a/.bash_prompt b/.dotfiles/tag-dev-setup/bash_prompt similarity index 100% rename from .bash_prompt rename to .dotfiles/tag-dev-setup/bash_prompt diff --git a/.bashrc b/.dotfiles/tag-dev-setup/bashrc similarity index 100% rename from .bashrc rename to .dotfiles/tag-dev-setup/bashrc diff --git a/bin/bash b/.dotfiles/tag-dev-setup/bin/bash similarity index 100% rename from bin/bash rename to .dotfiles/tag-dev-setup/bin/bash diff --git a/bin/httpcompression b/.dotfiles/tag-dev-setup/bin/httpcompression similarity index 99% rename from bin/httpcompression rename to .dotfiles/tag-dev-setup/bin/httpcompression index 544c2b1f7..b9de205ed 100755 --- a/bin/httpcompression +++ b/.dotfiles/tag-dev-setup/bin/httpcompression @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash # DESCRIPTION: # diff --git a/bin/subl b/.dotfiles/tag-dev-setup/bin/subl similarity index 100% rename from bin/subl rename to .dotfiles/tag-dev-setup/bin/subl diff --git a/.curlrc b/.dotfiles/tag-dev-setup/curlrc similarity index 100% rename from .curlrc rename to .dotfiles/tag-dev-setup/curlrc diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/android b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/android new file mode 100644 index 000000000..9fcd14fdd --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/android @@ -0,0 +1,8 @@ +cask_args appdir: "/Applications" + +brew "android-sdk" + +cask "java" +cask "intellij-idea-ce" +cask "android-studio" + diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/aws b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/aws new file mode 100644 index 000000000..c882158e3 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/aws @@ -0,0 +1 @@ +brew "apache-spark" diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/base b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/base new file mode 100644 index 000000000..01958ca45 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/base @@ -0,0 +1,3 @@ +tap "thoughtbot/formulae" + +brew "rcm" diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/datastores b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/datastores new file mode 100644 index 000000000..0ef94fa61 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/datastores @@ -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" diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/essentials b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/essentials new file mode 100644 index 000000000..dda17937f --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/essentials @@ -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" diff --git a/.dotfiles/tag-dev-setup/dev-setup/brewfiles/web b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/web new file mode 100644 index 000000000..e4feee601 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/brewfiles/web @@ -0,0 +1 @@ +brew "node" diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/android.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/android.sh new file mode 100755 index 000000000..59217a0c7 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/android.sh @@ -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" diff --git a/aws.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/aws.sh similarity index 86% rename from aws.sh rename to .dotfiles/tag-dev-setup/dev-setup/modules/aws.sh index e8b6fefa9..48f6052d1 100755 --- a/aws.sh +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/aws.sh @@ -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." @@ -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 @@ -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 @@ -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." \ No newline at end of file +echo "Script completed." diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/base.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/base.sh new file mode 100755 index 000000000..c3d219246 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/base.sh @@ -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 diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/datastores.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/datastores.sh new file mode 100755 index 000000000..8c8b6f0f2 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/datastores.sh @@ -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" diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/essentials.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/essentials.sh new file mode 100755 index 000000000..a1ecc788a --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/essentials.sh @@ -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 diff --git a/osx.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/macos.sh similarity index 98% rename from osx.sh rename to .dotfiles/tag-dev-setup/dev-setup/modules/macos.sh index 14cdfba54..8f667a6fe 100755 --- a/osx.sh +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/macos.sh @@ -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 # ############################################################################### @@ -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 @@ -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 @@ -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 # diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/macosupdate.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/macosupdate.sh new file mode 100755 index 000000000..a18180cc2 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/macosupdate.sh @@ -0,0 +1,24 @@ +#!/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 + +echo "------------------------------" +echo "Updating macOS. If this requires a restart, run the script again." +echo "------------------------------" +echo "" + +# Install all available updates +sudo softwareupdate -i -a + +# homebrew is installing xcode there this step is not needed +# for convenience i am leaving this here +#if [[ -z $(xcode-select -p) ]]; then +# echo "------------------------------" +# echo "Installing Xcode Command Line Tools." +# +# xcode-select --install +#fi diff --git a/pydata.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/pydata.sh similarity index 89% rename from pydata.sh rename to .dotfiles/tag-dev-setup/dev-setup/modules/pydata.sh index ebdb710d4..c66a76036 100755 --- a/pydata.sh +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/pydata.sh @@ -1,10 +1,9 @@ -#!/usr/bin/env bash +#!/bin/bash -# ~/pydata.sh - -# Removed user's cached credentials -# This script might be run with .dots, which uses elevated privileges -sudo -K +echo "------------------------------" +echo "Setting up Python data development environment." +echo "------------------------------" +echo "" echo "------------------------------" echo "Setting up pip." @@ -97,14 +96,8 @@ pip install mysqlclient # Install IPython Profile ############################################################################### -echo "------------------------------" -echo "Installing IPython Notebook Default Profile" - -# Add the IPython profile -mkdir -p ~/.ipython -cp -r init/profile_default/ ~/.ipython/profile_default echo "------------------------------" echo "Script completed." echo "Usage: workon py2-data for Python2" -echo "Usage: workon py3-data for Python3" \ No newline at end of file +echo "Usage: workon py3-data for Python3" diff --git a/.dotfiles/tag-dev-setup/dev-setup/modules/web.sh b/.dotfiles/tag-dev-setup/dev-setup/modules/web.sh new file mode 100755 index 000000000..e17e7d904 --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/modules/web.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +echo "------------------------------" +echo "Setting up JavaScript web development environment." +echo "------------------------------" +echo "" + +brew bundle install --file="${SCRIPT_DIR}/../brewfiles/web" + +npm install -g coffee-script +npm install -g grunt-cli +npm install -g jshint +npm install -g less + +#gem install jekyll diff --git a/init/Preferences.sublime-settings b/.dotfiles/tag-dev-setup/dev-setup/themes/Preferences.sublime-settings similarity index 100% rename from init/Preferences.sublime-settings rename to .dotfiles/tag-dev-setup/dev-setup/themes/Preferences.sublime-settings diff --git a/init/Solarized Dark xterm-256color.terminal b/.dotfiles/tag-dev-setup/dev-setup/themes/Solarized Dark xterm-256color.terminal similarity index 100% rename from init/Solarized Dark xterm-256color.terminal rename to .dotfiles/tag-dev-setup/dev-setup/themes/Solarized Dark xterm-256color.terminal diff --git a/init/Solarized Dark.itermcolors b/.dotfiles/tag-dev-setup/dev-setup/themes/Solarized Dark.itermcolors similarity index 100% rename from init/Solarized Dark.itermcolors rename to .dotfiles/tag-dev-setup/dev-setup/themes/Solarized Dark.itermcolors diff --git a/.dotfiles/tag-dev-setup/dev-setup/update.sh b/.dotfiles/tag-dev-setup/dev-setup/update.sh new file mode 100755 index 000000000..533231a5d --- /dev/null +++ b/.dotfiles/tag-dev-setup/dev-setup/update.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Change this update file in your rcm tag directory to your needs +# You should consider adapting the username to point to your repo +readonly username="omares" +readonly version="master" + +readonly download_uri="https://github.com/${username}/dev-setup/tarball/${version}" + +echo "Update via tarball download and extraction" +provision_enabled && curl -#L ${download_uri} | tar -xv --strip-components 1 --exclude={README.md,LICENSE} + + diff --git a/.editorconfig b/.dotfiles/tag-dev-setup/editorconfig similarity index 100% rename from .editorconfig rename to .dotfiles/tag-dev-setup/editorconfig diff --git a/.exports b/.dotfiles/tag-dev-setup/exports similarity index 100% rename from .exports rename to .dotfiles/tag-dev-setup/exports diff --git a/.functions b/.dotfiles/tag-dev-setup/functions similarity index 100% rename from .functions rename to .dotfiles/tag-dev-setup/functions diff --git a/.gdbinit b/.dotfiles/tag-dev-setup/gdbinit similarity index 100% rename from .gdbinit rename to .dotfiles/tag-dev-setup/gdbinit diff --git a/.gitattributes b/.dotfiles/tag-dev-setup/gitattributes similarity index 100% rename from .gitattributes rename to .dotfiles/tag-dev-setup/gitattributes diff --git a/.gitconfig b/.dotfiles/tag-dev-setup/gitconfig similarity index 100% rename from .gitconfig rename to .dotfiles/tag-dev-setup/gitconfig diff --git a/.gitignore b/.dotfiles/tag-dev-setup/gitignore similarity index 100% rename from .gitignore rename to .dotfiles/tag-dev-setup/gitignore diff --git a/.gvimrc b/.dotfiles/tag-dev-setup/gvimrc similarity index 100% rename from .gvimrc rename to .dotfiles/tag-dev-setup/gvimrc diff --git a/.hgignore b/.dotfiles/tag-dev-setup/hgignore similarity index 100% rename from .hgignore rename to .dotfiles/tag-dev-setup/hgignore diff --git a/.hushlogin b/.dotfiles/tag-dev-setup/hushlogin similarity index 100% rename from .hushlogin rename to .dotfiles/tag-dev-setup/hushlogin diff --git a/.inputrc b/.dotfiles/tag-dev-setup/inputrc similarity index 100% rename from .inputrc rename to .dotfiles/tag-dev-setup/inputrc diff --git a/init/profile_default/startup/README b/.dotfiles/tag-dev-setup/ipython/profile_default/startup/README similarity index 100% rename from init/profile_default/startup/README rename to .dotfiles/tag-dev-setup/ipython/profile_default/startup/README diff --git a/init/profile_default/static/custom/custom.css b/.dotfiles/tag-dev-setup/ipython/profile_default/static/custom/custom.css similarity index 100% rename from init/profile_default/static/custom/custom.css rename to .dotfiles/tag-dev-setup/ipython/profile_default/static/custom/custom.css diff --git a/init/profile_default/static/custom/custom.js b/.dotfiles/tag-dev-setup/ipython/profile_default/static/custom/custom.js similarity index 100% rename from init/profile_default/static/custom/custom.js rename to .dotfiles/tag-dev-setup/ipython/profile_default/static/custom/custom.js diff --git a/init/profile_pyspark/history.sqlite b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/history.sqlite similarity index 100% rename from init/profile_pyspark/history.sqlite rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/history.sqlite diff --git a/init/profile_pyspark/ipython_config.py b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_config.py similarity index 100% rename from init/profile_pyspark/ipython_config.py rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_config.py diff --git a/init/profile_pyspark/ipython_nbconvert_config.py b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_nbconvert_config.py similarity index 100% rename from init/profile_pyspark/ipython_nbconvert_config.py rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_nbconvert_config.py diff --git a/init/profile_pyspark/ipython_notebook_config.py b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_notebook_config.py similarity index 100% rename from init/profile_pyspark/ipython_notebook_config.py rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_notebook_config.py diff --git a/init/profile_pyspark/ipython_qtconsole_config.py b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_qtconsole_config.py similarity index 100% rename from init/profile_pyspark/ipython_qtconsole_config.py rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/ipython_qtconsole_config.py diff --git a/init/profile_pyspark/startup/00-pyspark-setup.py b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/startup/00-pyspark-setup.py similarity index 100% rename from init/profile_pyspark/startup/00-pyspark-setup.py rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/startup/00-pyspark-setup.py diff --git a/init/profile_pyspark/startup/README b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/startup/README similarity index 100% rename from init/profile_pyspark/startup/README rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/startup/README diff --git a/init/profile_pyspark/static/custom/custom.css b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/static/custom/custom.css similarity index 100% rename from init/profile_pyspark/static/custom/custom.css rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/static/custom/custom.css diff --git a/init/profile_pyspark/static/custom/custom.js b/.dotfiles/tag-dev-setup/ipython/profile_pyspark/static/custom/custom.js similarity index 100% rename from init/profile_pyspark/static/custom/custom.js rename to .dotfiles/tag-dev-setup/ipython/profile_pyspark/static/custom/custom.js diff --git a/.mrjob.conf b/.dotfiles/tag-dev-setup/mrjob.conf similarity index 96% rename from .mrjob.conf rename to .dotfiles/tag-dev-setup/mrjob.conf index ee89d3595..813897b31 100755 --- a/.mrjob.conf +++ b/.dotfiles/tag-dev-setup/mrjob.conf @@ -1,17 +1,17 @@ -runners: - emr: - aws_access_key_id: YOURACCESSKEY - aws_secret_access_key: YOURSECRETKEY - aws_region: us-east-1 - ec2_key_pair: YOURKEYPAIR - ec2_key_pair_file: ~/.ssh/YOURKEYPAIR.pem - ssh_tunnel_to_job_tracker: true - ec2_master_instance_type: m1.small - ec2_instance_type: m1.small - num_ec2_instances: 5 - s3_scratch_uri: s3://YOURBUCKETSCRATCH - s3_log_uri: s3://YOURBUCKETLOG - enable_emr_debugging: True - bootstrap: - - sudo apt-get install -y python-pip - - sudo pip install --upgrade simplejson +runners: + emr: + aws_access_key_id: YOURACCESSKEY + aws_secret_access_key: YOURSECRETKEY + aws_region: us-east-1 + ec2_key_pair: YOURKEYPAIR + ec2_key_pair_file: ~/.ssh/YOURKEYPAIR.pem + ssh_tunnel_to_job_tracker: true + ec2_master_instance_type: m1.small + ec2_instance_type: m1.small + num_ec2_instances: 5 + s3_scratch_uri: s3://YOURBUCKETSCRATCH + s3_log_uri: s3://YOURBUCKETLOG + enable_emr_debugging: True + bootstrap: + - sudo apt-get install -y python-pip + - sudo pip install --upgrade simplejson diff --git a/.s3cfg b/.dotfiles/tag-dev-setup/s3cfg similarity index 100% rename from .s3cfg rename to .dotfiles/tag-dev-setup/s3cfg diff --git a/.screenrc b/.dotfiles/tag-dev-setup/screenrc similarity index 100% rename from .screenrc rename to .dotfiles/tag-dev-setup/screenrc diff --git a/.vim/backups/.gitignore b/.dotfiles/tag-dev-setup/vim/backups/.gitignore similarity index 100% rename from .vim/backups/.gitignore rename to .dotfiles/tag-dev-setup/vim/backups/.gitignore diff --git a/.vim/colors/solarized.vim b/.dotfiles/tag-dev-setup/vim/colors/solarized.vim similarity index 100% rename from .vim/colors/solarized.vim rename to .dotfiles/tag-dev-setup/vim/colors/solarized.vim diff --git a/.vim/swaps/.gitignore b/.dotfiles/tag-dev-setup/vim/swaps/.gitignore similarity index 100% rename from .vim/swaps/.gitignore rename to .dotfiles/tag-dev-setup/vim/swaps/.gitignore diff --git a/.vim/syntax/json.vim b/.dotfiles/tag-dev-setup/vim/syntax/json.vim similarity index 100% rename from .vim/syntax/json.vim rename to .dotfiles/tag-dev-setup/vim/syntax/json.vim diff --git a/.vim/undo/.gitignore b/.dotfiles/tag-dev-setup/vim/undo/.gitignore similarity index 100% rename from .vim/undo/.gitignore rename to .dotfiles/tag-dev-setup/vim/undo/.gitignore diff --git a/.vimrc b/.dotfiles/tag-dev-setup/vimrc similarity index 100% rename from .vimrc rename to .dotfiles/tag-dev-setup/vimrc diff --git a/.wgetrc b/.dotfiles/tag-dev-setup/wgetrc similarity index 100% rename from .wgetrc rename to .dotfiles/tag-dev-setup/wgetrc diff --git a/.dots b/.dots deleted file mode 100755 index 61103a9cd..000000000 --- a/.dots +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash - -function runDots() { - # Ask for the administrator password upfront - sudo -v - - # Keep-alive: update existing `sudo` time stamp until the script has finished - while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - - # Run sections based on command line arguments - for ARG in "$@" - do - if [ $ARG == "bootstrap" ] || [ $ARG == "all" ]; then - echo "" - echo "------------------------------" - echo "Syncing the dev-setup repo to your local machine." - echo "------------------------------" - echo "" - cd ~ && curl -#L https://github.com/donnemartin/dev-setup/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,LICENSE} - fi - if [ $ARG == "osxprep" ] || [ $ARG == "all" ]; then - # Run the osxprep.sh Script - echo "" - echo "------------------------------" - echo "Updating OSX and installing Xcode command line tools" - echo "------------------------------" - echo "" - ./osxprep.sh - fi - if [ $ARG == "brew" ] || [ $ARG == "all" ]; then - # Run the brew.sh Script - # For a full listing of installed formulae and apps, refer to - # the commented brew.sh source file directly and tweak it to - # suit your needs. - echo "" - echo "------------------------------" - echo "Installing Homebrew along with some common formulae and apps." - echo "This might awhile to complete, as some formulae need to be installed from source." - echo "------------------------------" - echo "" - ./brew.sh - fi - if [ $ARG == "osx" ] || [ $ARG == "all" ]; then - # 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 "------------------------------" - echo "Setting sensible OSX defaults." - echo "------------------------------" - echo "" - ./osx.sh - fi - if [ $ARG == "pydata" ] || [ $ARG == "all" ]; then - # Run the pydata.sh Script - echo "------------------------------" - echo "Setting up Python data development environment." - echo "------------------------------" - echo "" - ./pydata.sh - fi - if [ $ARG == "aws" ] || [ $ARG == "all" ]; then - # Run the aws.sh Script - echo "------------------------------" - echo "Setting up AWS development environment." - echo "------------------------------" - echo "" - ./aws.sh - fi - if [ $ARG == "datastores" ] || [ $ARG == "all" ]; then - # Run the datastores.sh Script - echo "------------------------------" - echo "Setting up data stores." - echo "------------------------------" - echo "" - ./datastores.sh - fi - if [ $ARG == "web" ] || [ $ARG == "all" ]; then - # Run the web.sh Script - echo "------------------------------" - echo "Setting up JavaScript web development environment." - echo "------------------------------" - echo "" - ./web.sh - fi - if [ $ARG == "android" ] || [ $ARG == "all" ]; then - # Run the android.sh Script - echo "------------------------------" - echo "Setting up Android development environment." - echo "------------------------------" - echo "" - ./android.sh - fi - done - - echo "------------------------------" - echo "Completed running .dots, restart your computer to ensure all updates take effect" - echo "------------------------------" -} - -read -p "This script may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; -echo ""; -if [[ $REPLY =~ ^[Yy]$ ]]; then - runDots $@ -fi; - -unset runDots; diff --git a/.rcrc b/.rcrc new file mode 100644 index 000000000..368e0aacb --- /dev/null +++ b/.rcrc @@ -0,0 +1,3 @@ +DOTFILES_DIRS=".dotfiles" +TAGS="dev-setup" +UNDOTTED="bin" diff --git a/README.md b/README.md index ea1ce4a06..95bb838d1 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,11 @@ This repo takes a more **light-weight** approach to automation using a combinati * [Single Setup Script](#single-setup-script) * [bootstrap.sh script](#bootstrapsh-script) * Syncs dev-setup to your local home directory `~` -* [osxprep.sh script](#osxprepsh-script) +* [macosupdate.sh script](#macosupdatesh-script) * Updates OS X and installs Xcode command line tools -* [brew.sh script](#brewsh-script) +* [essentials.sh script](#brewsh-script) * Installs common Homebrew formulae and apps -* [osx.sh script](#osxsh-script) +* [macos.sh script](#macossh-script) * Sets up OS X defaults geared towards developers * [pydata.sh script](#pydatash-script) * Sets up python for data analysis @@ -157,62 +157,59 @@ This repo takes a more **light-weight** approach to automation using a combinati $ git clone https://github.com/donnemartin/dev-setup.git && cd dev-setup -##### Run the .dots Script with Command Line Arguments +##### Run the devsetup Script with Command Line Arguments -**Since you probably don't want to install every section**, the `.dots` script supports command line arguments to run only specified sections. Simply pass in the [scripts](#scripts) that you want to install. Below are some examples. +**Since you probably don't want to install every section**, the `devsetup` script supports command line arguments to run only specified sections. Simply pass in the [scripts](#scripts) that you want to install. Below are some examples. -**For more customization, you can [clone](#clone-the-repo) or [fork](https://github.com/donnemartin/dev-setup/fork) the repo and tweak the `.dots` script and its associated components to suit your needs.** +**For more customization, you can [clone](#clone-the-repo) or [fork](https://github.com/donnemartin/dev-setup/fork) the repo and tweak the `devsetup` script and its associated components to suit your needs.** Run all: - $ ./.dots all + $ ./devsetup -p -Run `bootstrap.sh`, `osxprep.sh`, `brew.sh`, and `osx.sh`: +Run `macosupdate.sh`, `essentials.sh`, and `macos.sh`: - $ ./.dots bootstrap osxprep brew osx + $ ./devsetup -p -m `macosupdate` -m macos -m essentials -Run `bootstrap.sh`, `osxprep.sh`, `brew.sh`, and `osx.sh`, `pydata.sh`, `aws.sh`, and `datastores.sh`: +Run `macosupdate.sh`, `essentials.sh`, and `macos.sh`, `pydata.sh`, `aws.sh`, and `datastores.sh`: - $ ./.dots bootstrap osxprep brew osx pydata aws datastores + $ ./devsetup -p -m `macosupdate` -m essentials -m macos -m pydata -m aws -m datastores #### Running without Git - $ curl -O https://raw.githubusercontent.com/donnemartin/dev-setup/master/.dots && ./.dots [Add ARGS Here] + $ curl -O https://raw.githubusercontent.com/omares/dev-setup/master/devsetup && ./devsetup [Add ARGS Here] #### Scripts -* [.dots](https://github.com/donnemartin/dev-setup/blob/master/.dots) +* devsetup * Runs specified scripts -* [bootstrap.sh](https://github.com/donnemartin/dev-setup/blob/master/bootstrap.sh) - * Syncs dev-setup to your local home directory `~` -* [osxprep.sh](https://github.com/donnemartin/dev-setup/blob/master/osxprep.sh) +* macosupdate.sh * Updates OS X and installs Xcode command line tools -* [brew.sh](https://github.com/donnemartin/dev-setup/blob/master/brew.sh) +* essentials.sh * Installs common Homebrew formulae and apps -* [osx.sh](https://github.com/donnemartin/dev-setup/blob/master/osx.sh) +* macos.sh * Sets up OS X defaults geared towards developers -* [pydata.sh](https://github.com/donnemartin/dev-setup/blob/master/pydata.sh) +* pydata.sh * Sets up python for data analysis -* [aws.sh](https://github.com/donnemartin/dev-setup/blob/master/aws.sh) +* aws.sh * Sets up Spark, Hadoop MapReduce, and Amazon Web Services -* [datastores.sh](https://github.com/donnemartin/dev-setup/blob/master/datastores.sh) +* datastores.sh * Sets up common data stores -* [web.sh](https://github.com/donnemartin/dev-setup/blob/master/web.sh) +* web.sh * Sets up JavaScript web development -* [android.sh](https://github.com/donnemartin/dev-setup/blob/master/android.sh) +* android.sh * Sets up Android development **Notes:** -* `.dots` will initially prompt you to enter your password. -* `.dots` might ask you to re-enter your password at certain stages of the installation. -* If OS X updates require a restart, simply run `.dots` again to resume where you left off. +* `devsetup` might ask you to enter your password at certain stages of the installation. +* If OS X updates require a restart, simply run `devsetup` again to resume where you left off. * When installing the Xcode command line tools, a dialog box will confirm installation. * Once Xcode is installed, follow the instructions on the terminal to continue. -* `.dots` runs `brew.sh`, which takes awhile to complete as some formulae need to be installed from source. -* **When `.dots` completes, be sure to restart your computer for all updates to take effect.** +* `devsetup` runs `essentials.sh`, which takes awhile to complete as some formulae need to be installed from source. +* **When `devsetup` completes, be sure to restart your computer for all updates to take effect.** -I encourage you to read through Section 1 so you have a better idea of what each installation script does. The following discussions describe in greater detail what is executed when running the [.dots](https://github.com/donnemartin/dev-setup/blob/master/.dots) script. +I encourage you to read through Section 1 so you have a better idea of what each installation script does. The following discussions describe in greater detail what is executed when running the [devsetup](https://github.com/donnemartin/dev-setup/blob/master/devsetup) script. ### bootstrap.sh script @@ -280,18 +277,18 @@ gpip(){ You could also use `~/.extra` to override settings, functions, and aliases from the dev-setup repository, although it’s probably better to [fork the dev-setup repository](https://github.com/donnemartin/dev-setup/fork). -### osxprep.sh script +### macosupdate.sh script


-Run the `osxprep.sh` script: +Run the `macosupdate.sh` script: - $ ./osxprep.sh + $ ./macosupdate.sh -`osxprep.sh` will first install all updates. If a restart is required, simply run the script again. Once all updates are installed, `osxprep.sh` will then [Install Xcode Command Line Tools](#install-xcode-command-line-tools). +`macosupdate.sh` will first install all updates. If a restart is required, simply run the script again. Once all updates are installed, `macosupdate.sh` will then [Install Xcode Command Line Tools](#install-xcode-command-line-tools). If you want to go the manual route, you can also install all updates by running "App Store", selecting the "Updates" icon, then updating both the OS and installed apps. @@ -303,7 +300,7 @@ If you are running **OS X 10.9 Mavericks or later**, then you can install the Xc $ xcode-select --install -**Note**: the `osxprep.sh` script executes this command. +**Note**: the `macosupdate.sh` script executes this command. Running the command above will display a dialog where you can either: * Install Xcode and the command line tools @@ -316,39 +313,39 @@ If you're running 10.8 or older, you'll need to go to [http://developer.apple.co Once you reach the downloads page, search for "command line tools", and download the latest **Command Line Tools (OS X Mountain Lion) for Xcode**. Open the **.dmg** file once it's done downloading, and double-click on the **.mpkg** installer to launch the installation. When it's done, you can unmount the disk in Finder. -### brew.sh script +### essentials.sh script


-When setting up a new Mac, you may want to install [Homebrew](http://brew.sh/), a package manager that simplifies installing and updating applications or libraries. +When setting up a new Mac, you may want to install [Homebrew](http://essentials.sh/), a package manager that simplifies installing and updating applications or libraries. -Some of the apps installed by the `brew.sh` script include: Chrome, Firefox, Sublime Text, Atom, Dropbox, Evernote, Skype, Slack, Alfred, VirtualBox, Vagrant, Docker, etc. **For a full listing of installed formulae and apps, refer to the commented [brew.sh source file](https://github.com/donnemartin/dev-setup/blob/master/brew.sh) directly and tweak it to suit your needs.** +Some of the apps installed by the `essentials.sh` script include: Chrome, Firefox, Sublime Text, Atom, Dropbox, Evernote, Skype, Slack, Alfred, VirtualBox, Vagrant, Docker, etc. **For a full listing of installed formulae and apps, refer to the commented [essentials.sh source file](https://github.com/donnemartin/dev-setup/blob/master/essentials.sh) directly and tweak it to suit your needs.** -Run the `brew.sh` script: +Run the `essentials.sh` script: - $ ./brew.sh + $ ./essentials.sh -The `brew.sh` script takes awhile to complete, as some formulae need to be installed from source. +The `essentials.sh` script takes awhile to complete, as some formulae need to be installed from source. **For your terminal customization to take full effect, quit and re-start the terminal** -### osx.sh script +### macos.sh script

- +

-When setting up a new Mac, you may want to set OS X defaults geared towards developers. The `osx.sh` script also configures common third-party apps such Sublime Text and Chrome. +When setting up a new Mac, you may want to set OS X defaults geared towards developers. The `macos.sh` script also configures common third-party apps such Sublime Text and Chrome. -**Note**: **I strongly encourage you read through the commented [osx.sh source file](https://github.com/donnemartin/dev-setup/blob/master/osx.sh) 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. +**Note**: **I strongly encourage you read through the commented [macos.sh source file](https://github.com/donnemartin/dev-setup/blob/master/macos.sh) 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. -Run the `osx.sh` script: +Run the `macos.sh` script: - $ ./osx.sh + $ ./macos.sh **For your terminal customization to take full effect, quit and re-start the terminal.** @@ -444,7 +441,7 @@ With the terminal, the text editor is a developer's most important tool. Everyon #### Installation -The [brew.sh script](#brewsh-script) installs Sublime Text. +The [essentials.sh script](#brewsh-script) installs Sublime Text. If you prefer to install it separately, go ahead and [download](http://www.sublimetext.com/) it. Open the **.dmg** file, drag-and-drop in the **Applications** folder. @@ -454,7 +451,7 @@ Sublime Text is not free, but I think it has an unlimited "evaluation period". A #### Configuration -The [osx.sh script](#osxsh-script) contains Sublime Text configurations. +The [macos.sh script](#macossh-script) contains Sublime Text configurations. #### Soda Theme @@ -524,7 +521,7 @@ I set my comments color to `#E6DB74`. #### Installation -The [brew.sh script](#brewsh-script) installs Atom. +The [essentials.sh script](#brewsh-script) installs Atom. If you prefer to install it separately, [download](https://atom.io/) it, open the **.dmg** file, drag-and-drop in the **Applications** folder. @@ -543,7 +540,7 @@ Since we spend so much time in the terminal, we should try to make it a more ple #### Configuration -The [bootstrap.sh script](#bootstrapsh-script) and [osx.sh script](#osxsh-script) contain terminal customizations. +The [bootstrap.sh script](#bootstrapsh-script) and [macos.sh script](#macossh-script) contain terminal customizations. ### iTerm2 @@ -602,12 +599,11 @@ VirtualBox creates and manages virtual machines. It's a solid free solution to #### Installation -The [brew.sh script](#brewsh-script) installs VirtualBox +The [essentials.sh script](#brewsh-script) installs VirtualBox If you prefer to install it separately, you can download it [here](https://www.virtualbox.org/wiki/Downloads) or run: $ brew update - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="/Applications" virtualbox ### Vagrant @@ -621,12 +617,11 @@ Vagrant creates and configures development environments. You can think of it as #### Installation -The [brew.sh script](#brewsh-script) installs Vagrant. +The [essentials.sh script](#brewsh-script) installs Vagrant. If you prefer to install it separately, you can download it [here](https://www.vagrantup.com/) or run: $ brew update - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="/Applications" vagrant ### Docker @@ -640,7 +635,7 @@ Docker automates the deployment of applications inside software containers. I t #### Installation -The [brew.sh script](#brewsh-script) installs Docker. +The [essentials.sh script](#brewsh-script) installs Docker. If you prefer to install it separately, you can download it [here](https://www.docker.com/) or run: @@ -699,7 +694,7 @@ They will get added to your `.gitconfig` file. To push code to your GitHub repositories, we're going to use the recommended HTTPS method (versus SSH). So you don't have to type your username and password everytime, let's enable Git password caching as described [here](https://help.github.com/articles/set-up-git): - $ git config --global credential.helper osxkeychain + $ git config --global credential.helper macoskeychain **Note**: On a Mac, it is important to remember to add `.DS_Store` (a hidden OS X system file that's put in folders) to your `.gitignore` files. You can take a look at this repository's [.gitignore](https://github.com/donnemartin/dev-setup/blob/master/.gitignore) file for inspiration. Also check out GitHub's [collection of .gitignore templates](https://github.com/github/gitignore). @@ -710,11 +705,11 @@ To push code to your GitHub repositories, we're going to use the recommended HTT

-Package managers make it so much easier to install and update applications (for Operating Systems) or libraries (for programming languages). The most popular one for OS X is [Homebrew](http://brew.sh/). +Package managers make it so much easier to install and update applications (for Operating Systems) or libraries (for programming languages). The most popular one for OS X is [Homebrew](http://essentials.sh/). #### Installation -The [brew.sh script](#brewsh-script) installs Homebrew and a number of useful Homebrew formulae and apps. +The [essentials.sh script](#brewsh-script) installs Homebrew and a number of useful Homebrew formulae and apps. If you prefer to install it separately, run the following command and follow the steps on the screen: @@ -763,7 +758,7 @@ To see what you have installed (with their version numbers): #### Installation -`brew.sh` provides [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build) which allow you to manage multiple versions of Ruby on the same machine. `brew.sh` adds the following line to your `.extra` file to initialize `rbenv`: +`essentials.sh` provides [rbenv](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build) which allow you to manage multiple versions of Ruby on the same machine. `essentials.sh` adds the following line to your `.extra` file to initialize `rbenv`: ``` eval "$(rbenv init -)" @@ -811,7 +806,7 @@ OS X, like Linux, ships with [Python](http://python.org/) already installed. But #### Installation -The [brew.sh script](#brewsh-script) installs the latest versions of Python 2 and Python 3. +The [essentials.sh script](#brewsh-script) installs the latest versions of Python 2 and Python 3. ### Pip @@ -1566,7 +1561,6 @@ In terms of a GUI client for MySQL, I'm used to the official and free [MySQL Wor The [datastores.sh script](#datastoressh-script) installs MySQL Workbench. If you prefer to install it separately, run: - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="/Applications" mysqlworkbench You can also find the MySQL Workbench download [here](http://www.mysql.com/downloads/workbench/). (**Note**: It will ask you to sign in, you don't need to, just click on "No thanks, just start my download!" at the bottom.) @@ -1823,7 +1817,6 @@ The [android.sh script](#androidsh-script) installs Java. If you prefer to install it separately, you can download the JDK [here](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or run: $ brew update - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="~/Applications" java ### Android SDK @@ -1849,7 +1842,6 @@ The [android.sh script](#androidsh-script) installs Android Studio. If you prefer to install it separately, you can download it [here](https://developer.android.com/sdk/index.html) or run: $ brew update - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="~/Applications" android-studio ### IntelliJ IDEA @@ -1864,7 +1856,6 @@ The [android.sh script](#androidsh-script) installs Java. If you prefer to install it separately, you can download it [here](https://www.jetbrains.com/idea/download/) or run: $ brew update - $ brew install caskroom/cask/brew-cask $ brew cask install --appdir="~/Applications" intellij-idea-ce ## Section 8: Misc diff --git a/android.sh b/android.sh deleted file mode 100755 index a646696b9..000000000 --- a/android.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Ask for the administrator password upfront. -sudo -v - -# Keep-alive: update existing `sudo` time stamp until the script has finished. -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# 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 cask install --appdir="~/Applications" java -brew cask install --appdir="~/Applications" intellij-idea-ce -brew cask install --appdir="~/Applications" android-studio - -brew install android-sdk - -# Remove outdated versions from the cellar. -brew cleanup diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index abe1aeeb2..000000000 --- a/bootstrap.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -cd "$(dirname "${BASH_SOURCE}")"; - -git pull origin master; - -function doIt() { - rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \ - --exclude "README.md" --exclude "LICENSE" -avh --no-perms . ~; - source ~/.bash_profile; -} - -if [ "$1" == "--force" -o "$1" == "-f" ]; then - doIt; -else - read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; - echo ""; - if [[ $REPLY =~ ^[Yy]$ ]]; then - doIt; - fi; -fi; -unset doIt; diff --git a/brew.sh b/brew.sh deleted file mode 100755 index 22a64c4f5..000000000 --- a/brew.sh +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Ask for the administrator password upfront. -sudo -v - -# Keep-alive: update existing `sudo` time stamp until the script has finished. -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# 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 - -# Upgrade any already-installed formulae. -brew upgrade --all - -# Install GNU core utilities (those that come with OS X are outdated). -# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. -brew install coreutils -sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum - -# Install some other useful utilities like `sponge`. -brew install moreutils -# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. -brew install findutils -# Install GNU `sed`, overwriting the built-in `sed`. -brew install gnu-sed --with-default-names -# Install Bash 4. -brew install bash -brew tap homebrew/versions -brew install bash-completion2 -# 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 - -# Install `wget` with IRI support. -brew install wget --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 install ringojs -brew install narwhal - -# Install Python -brew install python -brew install python3 - -# Install ruby-build and rbenv -brew install ruby-build -brew install rbenv -LINE='eval "$(rbenv init -)"' -grep -q "$LINE" ~/.extra || echo "$LINE" >> ~/.extra - -# Install more recent versions of some OS X tools. -brew install vim --override-system-vi -brew install homebrew/dupes/grep -brew install homebrew/dupes/openssh -brew install homebrew/dupes/screen -brew install homebrew/php/php55 --with-gmp - -# Install font tools. -brew tap bramstein/webfonttools -brew install sfnt2woff -brew install sfnt2woff-zopfli -brew install woff2 - -# Install some CTF tools; see https://github.com/ctfs/write-ups. -brew install aircrack-ng -brew install bfg -brew install binutils -brew install binwalk -brew install cifer -brew install dex2jar -brew install dns2tcp -brew install fcrackzip -brew install foremost -brew install hashpump -brew install hydra -brew install john -brew install knock -brew install netpbm -brew install nmap -brew install pngcheck -brew install socat -brew install sqlmap -brew install tcpflow -brew install tcpreplay -brew install tcptrace -brew install ucspi-tcp # `tcpserver` etc. -brew install homebrew/x11/xpdf -brew install xz - -# Install other useful binaries. -brew install ack -brew install dark-mode -#brew install exiv2 -brew install git -brew install git-lfs -brew install git-flow -brew install git-extras -brew install hub -brew install imagemagick --with-webp -brew install lua -brew install lynx -brew install p7zip -brew install pigz -brew install pv -brew install rename -brew install rhino -brew install speedtest_cli -brew install ssh-copy-id -brew install tree -brew install webkit2png -brew install zopfli -brew install pkg-config libffi -brew install pandoc - -# Lxml and Libxslt -brew install libxml2 -brew install libxslt -brew link libxml2 --force -brew link libxslt --force - -# Install Heroku -brew install heroku-toolbelt -heroku update - -# Core casks -brew cask install --appdir="/Applications" alfred -brew cask install --appdir="~/Applications" iterm2 -brew cask install --appdir="~/Applications" java -brew cask install --appdir="~/Applications" xquartz - -# Development tool casks -brew cask install --appdir="/Applications" sublime-text -brew cask install --appdir="/Applications" atom -brew cask install --appdir="/Applications" virtualbox -brew cask install --appdir="/Applications" vagrant -brew cask install --appdir="/Applications" macdown - -# Misc casks -brew cask install --appdir="/Applications" google-chrome -brew cask install --appdir="/Applications" firefox -brew cask install --appdir="/Applications" skype -brew cask install --appdir="/Applications" slack -brew cask install --appdir="/Applications" dropbox -brew cask install --appdir="/Applications" evernote -brew cask install --appdir="/Applications" 1password -#brew cask install --appdir="/Applications" gimp -#brew cask install --appdir="/Applications" inkscape - -#Remove comment to install LaTeX distribution MacTeX -#brew cask install --appdir="/Applications" mactex - -# Install Docker, which requires virtualbox -brew install docker -brew install boot2docker - -# Install developer friendly quick look plugins; see https://github.com/sindresorhus/quick-look-plugins -brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzipql qlimagesize webpquicklook suspicious-package - -# Remove outdated versions from the cellar. -brew cleanup diff --git a/datastores.sh b/datastores.sh deleted file mode 100755 index bc6fb882e..000000000 --- a/datastores.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Ask for the administrator password upfront. -sudo -v - -# Keep-alive: update existing `sudo` time stamp until the script has finished. -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# 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 - -# Install data stores -brew install mysql -brew install postgresql -brew install mongo -brew install redis -brew install elasticsearch - -# Install mysql workbench -# Install Cask -brew install caskroom/cask/brew-cask -brew cask install --appdir="/Applications" mysqlworkbench - -# Remove outdated versions from the cellar. -brew cleanup \ No newline at end of file diff --git a/devsetup b/devsetup new file mode 100755 index 000000000..1c4797769 --- /dev/null +++ b/devsetup @@ -0,0 +1,217 @@ +#!/bin/bash +# +# This is a rather minimal example Argbash potential +# Example taken from http://argbash.readthedocs.io/en/stable/example.html +# +# ARG_OPTIONAL_BOOLEAN([selfupdate],[],[Update dev-setup],[]) +# ARG_OPTIONAL_BOOLEAN([provision],[p],[Provision with given modules (default all)],[off]) +# ARG_OPTIONAL_REPEATED([modules],[m],[Modules to provision, all if none given]) +# ARG_TYPE_GROUP_SET([modules],[modules],[modules],[macosupdate,macos,essentials,android,aws,datastores,pydata,web,all]) +# ARG_HELP([dev-setup installer]) +# ARGBASH_GO() +# needed because of Argbash --> m4_ignore([ +### START OF CODE GENERATED BY Argbash v2.6.1 one line above ### +# Argbash is a bash code generator used to get arguments parsing right. +# Argbash is FREE SOFTWARE, see https://argbash.io for more info +# Generated online by https://argbash.io/generate + +die() +{ + local _ret=$2 + test -n "$_ret" || _ret=1 + test "$_PRINT_HELP" = yes && print_help >&2 + echo "$1" >&2 + exit ${_ret} +} + +begins_with_short_option() +{ + local first_option all_short_options + all_short_options='pmh' + first_option="${1:0:1}" + test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0 +} + + +# validators +modules() +{ + local _allowed=("macosupdate" "macos" "essentials" "android" "aws" "datastores" "pydata" "web" "all") + local _seeking="$1" + for element in "${_allowed[@]}" + do + test "$element" = "$_seeking" && echo "$element" && return 0 + done + die "Value '$_seeking' (of argument '$2') doesn't match the list of allowed values: 'macosupdate', 'macos', 'essentials', 'android', 'aws', 'datastores', 'pydata', 'web' and 'all'" 4 +} + +# THE DEFAULTS INITIALIZATION - OPTIONALS +_arg_selfupdate="off" +_arg_provision="off" +_arg_modules=() + +print_help () +{ + printf '%s\n' "dev-setup installer" + printf 'Usage: %s [--(no-)selfupdate] [-p|--(no-)provision] [-m|--modules ] [-h|--help]\n' "$0" + printf '\t%s\n' "--selfupdate,--no-selfupdate: Update dev-setup (off by default)" + printf '\t%s\n' "-p,--provision,--no-provision: Provision with given modules (default all) (off by default)" + printf '\t%s\n' "-m,--modules: Modules to provision, all if none given (one of 'macosupdate', 'macos', 'essentials', 'android', 'aws', 'datastores', 'pydata', 'web' and 'all'; empty by default)" + printf '\t%s\n' "-h,--help: Prints help" +} + +parse_commandline () +{ + while test $# -gt 0 + do + _key="$1" + case "$_key" in + --no-selfupdate|--selfupdate) + _arg_selfupdate="on" + test "${1:0:5}" = "--no-" && _arg_selfupdate="off" + ;; + -p|--no-provision|--provision) + _arg_provision="on" + test "${1:0:5}" = "--no-" && _arg_provision="off" + ;; + -p*) + _arg_provision="on" + _next="${_key##-p}" + if test -n "$_next" -a "$_next" != "$_key" + then + begins_with_short_option "$_next" && shift && set -- "-p" "-${_next}" "$@" || die "The short option '$_key' can't be decomposed to ${_key:0:2} and -${_key:2}, because ${_key:0:2} doesn't accept value and '-${_key:2:1}' doesn't correspond to a short option." + fi + ;; + -m|--modules) + test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1 + _arg_modules+=("$(modules "$2" "modules")") || exit 1 + shift + ;; + --modules=*) + _arg_modules+=("$(modules "${_key##--modules=}" "modules")") || exit 1 + ;; + -m*) + _arg_modules+=("$(modules "${_key##-m}" "modules")") || exit 1 + ;; + -h|--help) + print_help + exit 0 + ;; + -h*) + print_help + exit 0 + ;; + *) + _PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1 + ;; + esac + shift + done +} + +parse_commandline "$@" + +# OTHER STUFF GENERATED BY Argbash +# Validation of values + +### END OF CODE GENERATED BY Argbash (sortof) ### ]) +# [ <-- needed because of Argbash + +readonly SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +if [[ -e "${SCRIPT_DIR}/.dotfiles/tag-dev-setup/dev-setup" ]]; then + echo "Development mode" + readonly PREFIX_PATH="${SCRIPT_DIR}/.dotfiles/tag-dev-setup/dev-setup" +else + readonly PREFIX_PATH=".dev-setup" +fi + + +provision_enabled() { + [[ ${_arg_provision} == "on" ]] +} + +export _arg_provision +export -f provision_enabled + +start_sudo() { + sudo -v + ( while true; do sudo -v; sleep 60; done; ) & + SUDO_PID="$!" + trap stop_sudo SIGINT SIGTERM +} + +stop_sudo() { + kill "$SUDO_PID" + trap - SIGINT SIGTERM + sudo -k +} + +provision_module() { + local -r module="${PREFIX_PATH}/modules/${1}.sh" + local -r requires_sudo=("macos" "macosupdate") + + if [[ ! -e ${module} ]]; then + echo "${module} does not seem to exist, skipping." + false + return + fi + + echo "Running ${module} module" + + if [[ " ${requires_sudo[@]} " =~ " ${1}" ]]; then + provision_enabled && ( start_sudo && ${module} && stop_sudo ) + else + provision_enabled && ( ${module} ) + fi +} + +# Run everything from home directory +( + cd ~ + + if [[ ${_arg_selfupdate} == "on" ]]; then + ${PREFIX_PATH}/update.sh + + ! provision_enabled && exit 0 + fi + + if ! provision_enabled ; then + _PRINT_HELP=yes die "Please provide the --provision switch to run dev-setup." 1 + exit 0 + fi + + read -p "dev-setup may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; + echo ""; + [[ ! $REPLY =~ ^[Yy]$ ]] && exit 0 + + [[ ${#_arg_modules[@]} = 0 || " ${_arg_modules[@]} " =~ " all " ]] && modules=("macosupdate" "macos" "essentials" "android" "aws" "datastores" "pydata" "web") || modules=("${_arg_modules[@]}") + + # 99% of our modules are not usable without homebrew and a proper dotfiles setup so we always run the base module + modules=("base" "${modules[@]}") + + # check if macosupdate is contained in module list and if so queue it at the beginning + if [[ " ${modules[@]} " =~ " macosupdate " ]]; then + _tmp_modules=() + + for module in "${modules[@]}" + do + [[ ${module} != "macosupdate" ]] && _tmp_modules+=("${module}") + done + + modules=("macosupdate" "${_tmp_modules[@]}") + fi + + # run modules + for module in "${modules[@]}" + do + provision_module ${module} + done + + echo "------------------------------" + echo "Completed running dev-setup, restart your computer to ensure all updates take effect." + echo "------------------------------" + +) + +# ] <-- needed because of Argbash diff --git a/osxprep.sh b/osxprep.sh deleted file mode 100755 index 25f2301d6..000000000 --- a/osxprep.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Ask for the administrator password upfront -sudo -v - -# Keep-alive: update existing `sudo` time stamp until `osxprep.sh` has finished -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# Step 1: Update the OS and Install Xcode Tools -echo "------------------------------" -echo "Updating OSX. If this requires a restart, run the script again." -# Install all available updates -sudo softwareupdate -iva -# Install only recommended available updates -#sudo softwareupdate -irv - -echo "------------------------------" -echo "Installing Xcode Command Line Tools." -# Install Xcode command line tools -xcode-select --install \ No newline at end of file diff --git a/web.sh b/web.sh deleted file mode 100755 index dee44602c..000000000 --- a/web.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# Install command-line tools using Homebrew. - -# Ask for the administrator password upfront. -sudo -v - -# Keep-alive: update existing `sudo` time stamp until the script has finished. -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -# 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 node - -# Remove outdated versions from the cellar. -brew cleanup - -npm install -g coffee-script -npm install -g grunt-cli -npm install -g jshint -npm install -g less - -#gem install jekyll