diff --git a/.dots b/.dots index b4efd27ee..5b5970a94 100755 --- a/.dots +++ b/.dots @@ -35,7 +35,7 @@ function runDots() { 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 "This might take a while to complete, as some formulae need to be installed from source." echo "------------------------------" echo "" ./brew.sh @@ -79,13 +79,13 @@ function runDots() { echo "" ./datastores.sh fi - if [ $ARG == "webdev" ] || [ $ARG == "all" ]; then - # Run the webdev.sh Script + if [ $ARG == "web" ] || [ $ARG == "all" ]; then + # Run the web.sh Script echo "------------------------------" echo "Setting up JavaScript web development environment." echo "------------------------------" echo "" - #./webdev.sh # coming soon + ./web.sh fi if [ $ARG == "android" ] || [ $ARG == "all" ]; then # Run the android.sh Script @@ -108,4 +108,4 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then runDots $@ fi; -unset runDots; \ No newline at end of file +unset runDots; diff --git a/.editorconfig b/.editorconfig index bec755324..c7c113da8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,11 @@ indent_style = tab end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +# 4 space indentation (pep8) +[*.py] +indent_style = space +indent_size = 4 + +[Makefile] +indent_style = tab diff --git a/.gitignore b/.gitignore index 5980f7d01..67d77cdcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# IntelliJ IDEA IDE +.idea + # Compiled Python files *.pyc @@ -21,4 +24,4 @@ Thumbs.db .aws/ # Repo scratch directory -scratch/ \ No newline at end of file +scratch/ diff --git a/LICENSE b/LICENSE index d60c16af5..36ad24f8c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,13 @@ -This repository contains a variety of content; some developed by Donne Martin, and some from third-parties. The third-party content is distributed under the license provided by those parties. +This repository contains a variety of content; some developed by Donne Martin, +and some from third-parties. The third-party content is distributed under the +license provided by those parties. The content developed by Donne Martin is distributed under the following license: +I am providing code and resources in this repository to you under an open source +license. Because this is my personal repository, the license you receive to my +code and resources is from me and not my employer (Facebook). + Copyright 2015 Donne Martin Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/README.md b/README.md index 9bb5209b4..ea1ce4a06 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This repo takes a more **light-weight** approach to automation using a combinati ## Section 1: Installation -**Scripts tested on OS X 10.10 Yosemite.** +**Scripts tested on OS X 10.10 Yosemite and 10.11 El Capitan.** * [Single Setup Script](#single-setup-script) * [bootstrap.sh script](#bootstrapsh-script) @@ -496,6 +496,23 @@ While inside the `Packages` directory, clone the theme repository using the comm "theme": "Soda Light 3.sublime-theme" } +##### Changing Monokai Comment Color + +Although Monokai is a great color scheme, I find that comments can be difficult to see. You can follow these [instructions](http://stackoverflow.com/a/32686509) to change the color of the default theme. + +I set my comments color to `#E6DB74`. + +``` + + ... + + foreground + #E6DB74 + + ... + +``` + ### Atom

@@ -535,15 +552,13 @@ The [bootstrap.sh script](#bootstrapsh-script) and [osx.sh script](#osxsh-script

-I prefer iTerm2 over the stock Terminal, as it has some some additional [great features](https://www.iterm2.com/features.html). Download and install iTerm2 (the newest version, even if it says "beta release"). +I prefer iTerm2 over the stock Terminal, as it has some additional [great features](https://www.iterm2.com/features.html). Download and install iTerm2 (the newest version, even if it says "beta release"). In Finder, drag and drop the iTerm Application file into the Applications folder. You can now launch iTerm, through the Launchpad for instance. -Let's just quickly change some preferences. In iTerm > Preferences..., under the tab General, uncheck Confirm closing multiple sessions and Confirm "Quit iTerm2 (Cmd+Q)" command under the section Closing. - -In the tab Profiles, create a new one with the "+" icon, and rename it to your first name for example. Then, select Other Actions... > Set as Default. Under the section Window, change the size to something better, like Columns: 125 and Rows: 35. I also like to set General > Working Directory > Reuse previous session's directory. Finally, I change the wy the option key works so that I can quickly jump between words as described [here](https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x). +Let's just quickly change some preferences. In iTerm > Preferences..., in the tab Profiles, create a new one with the "+" icon, and rename it to your first name for example. Then, select Other Actions... > Set as Default. Under the section Window, change the size to something better, like Columns: 125 and Rows: 35. I also like to set General > Working Directory > Reuse previous session's directory. Finally, I change the way the option key works so that I can quickly jump between words as described [here](https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x). When done, hit the red "X" in the upper left (saving is automatic in OS X preference panes). Close the window and open a new one to see the size change. @@ -551,27 +566,9 @@ When done, hit the red "X" in the upper left (saving is automatic in OS X prefer Since we spend so much time in the terminal, we should try to make it a more pleasant and colorful place. What follows might seem like a lot of work, but trust me, it'll make the development experience so much better. -Let's go ahead and start by changing the font. In **iTerm > Preferences...**, under the tab **Profiles**, section **Text**, change both fonts to **Consolas 13pt**. - Now let's add some color. I'm a big fan of the [Solarized](http://ethanschoonover.com/solarized) color scheme. It is supposed to be scientifically optimal for the eyes. I just find it pretty. -Scroll down the page and download the latest version. Unzip the archive. In it you will find the `iterm2-colors-solarized` folder with a `README.md` file, but I will just walk you through it here: - -- In **iTerm2 Preferences**, under **Profiles** and **Colors**, go to **Load Presets... > Import...**, find and open the two **.itermcolors** files we downloaded. -- Go back to **Load Presets...** and select **Solarized Dark** to activate it. Voila! - -**Note**: You don't have to do this, but there is one color in the **Solarized Dark** preset I don't agree with, which is *Bright Black*. You'll notice it's too close to *Black*. So I change it to be the same as *Bright Yellow*, i.e. **R 83 G 104 B 112**. - -Not a lot of colors yet. We need to tweak a little bit our Unix user's profile for that. This is done (on OS X and Linux), in the `~/.bash_profile` text file (`~` stands for the user's home directory). - -We'll come back to the details of that later, but for now, just download the files [.bash_profile](https://raw.githubusercontent.com/donnemartin/dev-setup/master/.bash_profile), [.bash_prompt](https://raw.githubusercontent.com/donnemartin/dev-setup/master/.bash_prompt), [.aliases](https://raw.githubusercontent.com/donnemartin/dev-setup/master/.aliases) attached to this document into your home directory (`.bash_profile` is the one that gets loaded, I've set it up to call the others): - - $ cd ~ - $ curl -O https://raw.githubusercontent.com/donnemartin/dev-setup/master/.bash_profile - $ curl -O https://raw.githubusercontent.com/donnemartin/dev-setup/master/.bash_prompt - $ curl -O https://raw.githubusercontent.com/donnemartin/mac-dev-setup/master/.aliases - -With that, open a new terminal tab (Cmd+T) and see the change! Try the list commands: `ls`, `ls -lh` (aliased to `ll`), `ls -lha` (aliased to `la`). +- In **iTerm2 Preferences**, under **Profiles** and **Colors**, go to **Load Presets...** and select **Solarized Dark** to activate it. Voila! At this point you can also change your computer's name, which shows up in this terminal prompt. If you want to do so, go to **System Preferences** > **Sharing**. For example, I changed mine from "Donne's MacBook Pro" to just "MacBook Pro", so it shows up as `MacBook-Pro` in the terminal. @@ -1884,11 +1881,7 @@ See the [Credits Page](https://github.com/donnemartin/dev-setup/blob/master/CRED Feel free to contact me to discuss any issues, questions, or comments. -* Email: [donne.martin@gmail.com](mailto:donne.martin@gmail.com) -* Twitter: [@donne_martin](https://twitter.com/donne_martin) -* GitHub: [donnemartin](https://github.com/donnemartin) -* LinkedIn: [donnemartin](https://www.linkedin.com/in/donnemartin) -* Website: [donnemartin.com](http://donnemartin.com) +My contact info can be found on my [GitHub page](https://github.com/donnemartin). ### License @@ -1896,6 +1889,8 @@ This repository contains a variety of content; some developed by Donne Martin, a The content developed by Donne Martin is distributed under the following license: +*I am providing code and resources in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code and resources is from me and not my employer (Facebook).* + Copyright 2015 Donne Martin Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/android.sh b/android.sh index 52efdcca9..a646696b9 100755 --- a/android.sh +++ b/android.sh @@ -18,9 +18,6 @@ fi # Make sure we’re using the latest Homebrew. brew update -# Install Cask -brew install caskroom/cask/brew-cask - brew cask install --appdir="~/Applications" java brew cask install --appdir="~/Applications" intellij-idea-ce brew cask install --appdir="~/Applications" android-studio diff --git a/brew.sh b/brew.sh index 13cae6ba9..2f8a7136f 100755 --- a/brew.sh +++ b/brew.sh @@ -31,10 +31,9 @@ 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 +brew install gnu-sed # 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" @@ -98,7 +97,7 @@ brew install tcpflow brew install tcpreplay brew install tcptrace brew install ucspi-tcp # `tcpserver` etc. -brew install xpdf +brew install homebrew/x11/xpdf brew install xz # Install other useful binaries. @@ -109,6 +108,7 @@ 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 @@ -132,12 +132,9 @@ brew link libxml2 --force brew link libxslt --force # Install Heroku -brew install heroku-toolbelt +brew install heroku/brew/heroku heroku update -# Install Cask -brew install caskroom/cask/brew-cask - # Core casks brew cask install --appdir="/Applications" alfred brew cask install --appdir="~/Applications" iterm2 @@ -145,11 +142,10 @@ brew cask install --appdir="~/Applications" java brew cask install --appdir="~/Applications" xquartz # Development tool casks -brew cask install --appdir="/Applications" sublime-text3 +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" heroku-toolbelt brew cask install --appdir="/Applications" macdown # Misc casks @@ -159,21 +155,19 @@ 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 -# Link cask apps to Alfred -brew cask alfred link - # 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 +brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzip qlimagesize webpquicklook suspicious-package quicklookase qlvideo # Remove outdated versions from the cellar. brew cleanup diff --git a/init/Preferences.sublime-settings b/init/Preferences.sublime-settings index 39587d4ae..b76702689 100644 --- a/init/Preferences.sublime-settings +++ b/init/Preferences.sublime-settings @@ -23,7 +23,7 @@ "font_face": "Monaco", "font_size": 10, "highlight_modified_tabs": true, - "hot_exit": false, + "hot_exit": true, "line_padding_bottom": 5, "match_brackets": true, "match_brackets_angle": true, @@ -35,7 +35,9 @@ "show_encoding": true, "show_line_endings": true, "tab_size": 4, + "theme": "Soda Dark 3.sublime-theme", "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, - "word_wrap": true + "word_wrap": true, + "always_show_minimap_viewport": true } diff --git a/osx.sh b/osx.sh index 782cb349b..14cdfba54 100755 --- a/osx.sh +++ b/osx.sh @@ -185,7 +185,8 @@ defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false # Set a blazingly fast keyboard repeat rate -defaults write NSGlobalDomain KeyRepeat -int 0 +defaults write NSGlobalDomain KeyRepeat -int 1 +defaults write NSGlobalDomain InitialKeyRepeat -int 15 # Set language and text formats #defaults write NSGlobalDomain AppleLanguages -array "en" @@ -214,8 +215,8 @@ defaults write com.apple.screensaver askForPasswordDelay -int 0 #defaults write com.apple.screencapture location -string "${HOME}/Desktop" # Save screenshots to the Pictures/Screenshots -#mkdir ${HOME}/Pictures/Screenshots -#defaults write com.apple.screencapture location -string "${HOME}/Pictures/Screenshots" +mkdir ${HOME}/Pictures/Screenshots +defaults write com.apple.screencapture location -string "${HOME}/Pictures/Screenshots" # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) defaults write com.apple.screencapture type -string "png" @@ -689,6 +690,8 @@ defaults write com.apple.TextEdit RichText -int 0 # Open and save files as UTF-8 in TextEdit defaults write com.apple.TextEdit PlainTextEncoding -int 4 defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 +# Set tab width to 4 instead of the default 8 +defaults write com.apple.TextEdit "TabWidth" '4' # Enable the debug menu in Disk Utility defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true diff --git a/osxprep.sh b/osxprep.sh index 25f2301d6..d5f4d9a46 100755 --- a/osxprep.sh +++ b/osxprep.sh @@ -10,11 +10,11 @@ while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & echo "------------------------------" echo "Updating OSX. If this requires a restart, run the script again." # Install all available updates -sudo softwareupdate -iva +sudo softwareupdate -ia --verbose # Install only recommended available updates -#sudo softwareupdate -irv +#sudo softwareupdate -ir --verbose echo "------------------------------" echo "Installing Xcode Command Line Tools." # Install Xcode command line tools -xcode-select --install \ No newline at end of file +xcode-select --install diff --git a/pydata.sh b/pydata.sh index 1cd8faa18..ebdb710d4 100755 --- a/pydata.sh +++ b/pydata.sh @@ -20,6 +20,8 @@ echo "------------------------------" echo "Setting up virtual environments." # Install virtual environments globally +# It fails to install virtualenv if PIP_REQUIRE_VIRTUALENV was true +export PIP_REQUIRE_VIRTUALENV=false pip install virtualenv pip install virtualenvwrapper @@ -99,6 +101,7 @@ echo "------------------------------" echo "Installing IPython Notebook Default Profile" # Add the IPython profile +mkdir -p ~/.ipython cp -r init/profile_default/ ~/.ipython/profile_default echo "------------------------------"