├── .DS_Store ├── .bash_profile ├── fonts.sh ├── .aliases ├── apps.sh ├── .bash_prompt ├── LICENSE ├── README.md └── init.sh /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kiriaze/mac-dev-env-yosemite/HEAD/.DS_Store -------------------------------------------------------------------------------- /.bash_profile: -------------------------------------------------------------------------------- 1 | # Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH` 2 | PATH=/usr/local/bin:$PATH 3 | PATH=$HOME/bin:$PATH 4 | export PATH 5 | 6 | # Load the shell dotfiles, and then some: 7 | # * ~/.path can be used to extend `$PATH`. 8 | # * ~/.extra can be used for other settings you don’t want to commit. 9 | for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do 10 | [ -r "$file" ] && source "$file" 11 | done 12 | unset file -------------------------------------------------------------------------------- /fonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #Installing fonts 3 | pretty_print "Installing some caskroom/fonts..." 4 | brew tap caskroom/fonts 5 | 6 | fonts=( 7 | font-m-plus 8 | font-clear-sans 9 | font-roboto 10 | font-open-sans 11 | font-source-sans-pro 12 | font-lato 13 | font-alegreya 14 | font-montserrat 15 | font-inconsolata 16 | font-pt-sans 17 | font-quattrocento-sans 18 | font-quicksand 19 | font-raleway 20 | font-sorts-mill-goudy 21 | font-ubuntu 22 | ) 23 | 24 | # install fonts 25 | pretty_print "Installing the fonts..." 26 | brew cask install ${fonts[@]} -------------------------------------------------------------------------------- /.aliases: -------------------------------------------------------------------------------- 1 | # Detect which `ls` flavor is in use 2 | if ls --color > /dev/null 2>&1; then # GNU `ls` 3 | colorflag="--color" 4 | else # OS X `ls` 5 | colorflag="-G" 6 | fi 7 | 8 | # List all files colorized in long format 9 | alias ll='ls -lh' 10 | 11 | # List all files colorized in long format, including dot files 12 | alias la="ls -lha" 13 | 14 | # List only directories 15 | alias lsd='ls -l | grep "^d"' 16 | 17 | # Always use color output for `ls` 18 | alias ls="command ls ${colorflag}" 19 | export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' -------------------------------------------------------------------------------- /apps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Apps 3 | apps=( 4 | adobe-creative-cloud 5 | anvil 6 | appcleaner 7 | asepsis 8 | atom 9 | betterzipql 10 | brackets 11 | caffeine 12 | carbon-copy-cloner 13 | cloudup 14 | codekit 15 | cyberduck 16 | dropbox 17 | droplr 18 | firefox 19 | flash 20 | fluid 21 | flux 22 | github-desktop 23 | githubpulse 24 | google-chrome 25 | harvest 26 | iterm2 27 | keka 28 | mailbox 29 | miro 30 | moom 31 | mou 32 | namechanger 33 | nvalt 34 | openoffice 35 | qlcolorcode 36 | qlimagesize 37 | qlmarkdown 38 | qlprettypatch 39 | qlstephen 40 | quicklook-csv 41 | quicklook-json 42 | screenflick 43 | sequel-pro 44 | sketch 45 | skype 46 | slack 47 | smcfancontrol 48 | sourcetree 49 | spotify 50 | sublime-text3 51 | suspicious-package 52 | tomighty 53 | tower 54 | transmission 55 | transmit 56 | unrarx 57 | vagrant 58 | virtualbox 59 | vlc 60 | webpquicklook 61 | ) 62 | 63 | # Install apps to /Applications 64 | # Default is: /Users/$user/Applications 65 | echo "installing apps..." 66 | brew cask install --appdir="/Applications" ${apps[@]} 67 | -------------------------------------------------------------------------------- /.bash_prompt: -------------------------------------------------------------------------------- 1 | # @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt” 2 | # Shamelessly copied from https://github.com/gf3/dotfiles 3 | # Screenshot: http://i.imgur.com/s0Blh.png 4 | 5 | if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then 6 | export TERM=gnome-256color 7 | elif infocmp xterm-256color >/dev/null 2>&1; then 8 | export TERM=xterm-256color 9 | fi 10 | 11 | if tput setaf 1 &> /dev/null; then 12 | tput sgr0 13 | if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then 14 | # Changed these colors to fit Solarized theme 15 | MAGENTA=$(tput setaf 125) 16 | ORANGE=$(tput setaf 166) 17 | GREEN=$(tput setaf 64) 18 | PURPLE=$(tput setaf 61) 19 | WHITE=$(tput setaf 244) 20 | else 21 | MAGENTA=$(tput setaf 5) 22 | ORANGE=$(tput setaf 4) 23 | GREEN=$(tput setaf 2) 24 | PURPLE=$(tput setaf 1) 25 | WHITE=$(tput setaf 7) 26 | fi 27 | BOLD=$(tput bold) 28 | RESET=$(tput sgr0) 29 | else 30 | MAGENTA="\033[1;31m" 31 | ORANGE="\033[1;33m" 32 | GREEN="\033[1;32m" 33 | PURPLE="\033[1;35m" 34 | WHITE="\033[1;37m" 35 | BOLD="" 36 | RESET="\033[m" 37 | fi 38 | 39 | export MAGENTA 40 | export ORANGE 41 | export GREEN 42 | export PURPLE 43 | export WHITE 44 | export BOLD 45 | export RESET 46 | 47 | function parse_git_dirty() { 48 | [[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*" 49 | } 50 | 51 | function parse_git_branch() { 52 | git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" 53 | } 54 | 55 | export PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" 56 | export PS2="\[$ORANGE\]→ \[$RESET\]" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | MDE (mac-dev-env) 2 | =========== 3 | 4 | ### Update (11.3.14) 5 | 6 | Self executing script v.1. Please read through script. 7 | 8 | $ sh ./init.sh 9 | 10 | --- 11 | 12 | ### General Notes 13 | Assumes this is on a fresh install of Yosemite. If you already have an environment setup, dont run the init.sh script, rather comb through this and cherry pick. Hopefully you're not using mamp or the like. 14 | 15 | All references to `subl` is for opening files within the Sublime Text editor, if you haven't heard of it, no worries, this setup will install it for you and set up an alias to use it with. 16 | 17 | Make sure your bash scripts have had `chmod +x` ran on them; e.g. `chmod +x script.sh`, making the file executable by everyone. 18 | 19 | Mac Dev Env Setup consists of: 20 | 21 | homebrew 22 | php 5.6 23 | update mac unix tools 24 | correct paths 25 | git 26 | ruby 27 | mysql/mariadb 28 | bash/zsh 29 | node 30 | nginx 31 | composer 32 | bower 33 | bundler 34 | grunt 35 | gulp 36 | cask - pretty much all your apps 37 | mackup - keep your app settings in sync. wHAT?! word. 38 | SublimeText3 / Chrome extensions 39 | iTerm settings 40 | 41 | # Run this exactly like this. 42 | 43 | 1. system pref 44 | * change name of computer 45 | * mouse/trackpad settings 46 | * hotspots 47 | 48 | 2. software updates 49 | * make sure youve updated everything. 50 | 51 | 3. xcode dev tools: 52 | * `$ xcode-select --install` 53 | * get xcode 54 | * install dev tools 55 | 56 | ## xquartz 57 | $ curl http://xquartz-dl.macosforge.org/SL/XQuartz-2.7.7.dmg -o /tmp/XQuartz.dmg 58 | $ open /tmp/XQuartz.dmg 59 | 60 | ## homebrew 61 | $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 62 | $ echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile 63 | $ brew doctor 64 | $ brew update 65 | $ brew upgrade 66 | $ brew tap homebrew/homebrew-php # theres also: brew tap homebrew/php 67 | $ brew install php56 68 | $ brew install imagemagick 69 | 70 | 71 | ## Update the unix tools you already have on your mac. 72 | 1. Install GNU core utilities (those that come with OS X are outdated) 73 | * `$ brew install coreutils` 74 | 75 | 2. Install GNU "find", "locate", "updatedb", and "xargs", g-prefixed 76 | * `$ brew install findutils` 77 | 78 | ### Install Bash 4 79 | `$ brew install bash` 80 | 81 | ### Install more recent versions of some OS X tools 82 | `$ brew install grep` 83 | 84 | #### You'll need to update PATH in your ~/.bash_profile to use these over their Mac counterparts: 85 | 86 | $ echo export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" >> ~/.bash_profile 87 | $ brew cleanup 88 | 89 | ### ZSH 90 | #### [Why should you be using ZSH instead of bash](https://github.com/robbyrussell/oh-my-zsh) 91 | $ brew install zsh 92 | $ sudo mv /etc/zshenv /etc/zprofile 93 | $ cat /etc/shells | grep zsh || which zsh | sudo tee -a /etc/shells 94 | $ chsh -s $(which zsh) 95 | 96 | #### Resetting your default login shell back to bash if need be 97 | `$ chsh -s /bin/bash` 98 | 99 | ## Setup PHP CLI binary 100 | 101 | ### If you use Bash 102 | `$ echo 'export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.bash_profile && . ~/.bash_profile` 103 | 104 | ### If you use ZSH 105 | `$ echo 'export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.zshrc && . ~/.zshrc` 106 | 107 | 108 | ## Setup auto start 109 | $ mkdir -p ~/Library/LaunchAgents 110 | # note below, path version might be different 111 | $ cp /usr/local/Cellar/php56/5.6.32_8/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/ 112 | 113 | 114 | ### mysql 115 | `$ brew install mysql` 116 | 117 | 118 | ### MariaDB 119 | $ brew unlink mysql 120 | $ brew info mariadb # Verify MariaDB Version in Homebrew Repo 121 | $ brew install mariadb # Install MariaDB 122 | 123 | # mysql setup auto start and start the database 124 | $ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents 125 | $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist 126 | 127 | # Run the Database Installer 128 | $ unset TMPDIR 129 | $ cd /usr/local/Cellar/mariadb/{VERSION} 130 | $ mysql_install_db 131 | 132 | # if mysql_install_db gives you errors and such, possible conflicting and multiple "mysqld" processes could be causing the sql server instance not to launch. 133 | # open up activity monitor and search for mysqld, and quit those processes 134 | # then try to start up mariadb with the code below 135 | 136 | $ mysql.server start # Start MariaDB 137 | $ mysql_secure_installation # Secure the Installation 138 | $ mysql -u root -p # Connect to MariaDB 139 | 140 | *mysql issues on 10.5.5, reference this link http://stackoverflow.com/questions/34345726/brew-install-mysql-on-mac-os-el-capitan* 141 | 142 | ### SequelPro 143 | SequelPro is installed via apps.sh if you're running the init.sh script with a few other apps. To use with MariaDB/MySql, add new Favorite in SequelPro sidebar, and set the host to 127.0.0.1 with the username 'root' and whatever password you set above in the MariaDB setup. Test connection, and save it. Now you can easily connect to all your local databases! 144 | 145 | ### Git 146 | $ brew install git 147 | 148 | # Write settings to ~/.gitconfig 149 | $ git config --global user.name '{YOUR NAME}' 150 | $ git config --global user.email {YOUR EMAIL} 151 | 152 | # a global git ignore file: 153 | $ git config --global core.excludesfile '~/.gitignore' 154 | $ echo '.DS_Store' >> ~/.gitignore 155 | 156 | # use keychain for storing passwords 157 | $ git config --global credential.helper osxkeychain 158 | 159 | # you might not see colors without this 160 | $ git config --global color.ui true 161 | 162 | # more useful settings: https://github.com/glebm/dotfiles/blob/master/.gitconfig 163 | 164 | # ssh keys - probably can skip this since github app auto adds it for you which is nice 165 | $ ls -al ~/.ssh # Lists the files in your .ssh directory, if they exist 166 | $ ssh-keygen -t rsa -C "your_email@example.com" # Creates a new ssh key, using the provided email as a label 167 | $ eval "$(ssh-agent -s)" # start the ssh-agent in the background 168 | $ ssh-add ~/.ssh/id_rsa 169 | $ pbcopy < ~/.ssh/id_rsa.pub # Copies the contents of the id_rsa.pub file to your clipboard to paste in github or w/e 170 | 171 | ### RVM 172 | $ curl -L https://get.rvm.io | bash -s stable --ruby 173 | $ brew update && brew upgrade 174 | $ rvm reinstall 2.4.1 --disable-binary 175 | 176 | ### Node 177 | $ brew update 178 | $ brew install node 179 | 180 | ### Composer 181 | $ brew update 182 | $ brew install composer 183 | 184 | ### Bower 185 | $ npm install -g bower 186 | 187 | ### Yarn (alternative to bower) 188 | $ brew install yarn 189 | 190 | ### Bundler 191 | $ gem install bundler 192 | # now you can use guard within projects 193 | 194 | ### Grunt 195 | with npm: 196 | 197 | $ npm install -g grunt-cli 198 | 199 | with yarn: 200 | 201 | $ yarn global add grunt-cli 202 | 203 | ### Gulp 204 | $ npm install --global gulp 205 | or 206 | 207 | $ yarn global add gulp 208 | 209 | ### Cask 210 | $ brew install caskroom/cask/brew-cask 211 | // If you want to install beta versions of things like Chrome Canary or Sublime Text 3, 212 | $ brew tap caskroom/versions 213 | $ brew cask install google-chrome # per app 214 | $ brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup # when done 215 | 216 | // fonts 217 | $ brew tap caskroom/fonts 218 | 219 | // apps 220 | # bash script to install apps -> apps.sh 221 | $ chmod u+x apps.sh # make it executable 222 | $ apps.sh # run it 223 | 224 | ### iterm 225 | $ cd ~ 226 | $ curl -O https://raw.githubusercontent.com/nicolashery/mac-dev-setup/master/.bash_profile 227 | $ curl -O https://raw.githubusercontent.com/nicolashery/mac-dev-setup/master/.bash_prompt 228 | $ curl -O https://raw.githubusercontent.com/nicolashery/mac-dev-setup/master/.aliases 229 | 230 | ### chrome extenstions 231 | 1. edit this cookie 232 | 2. page speed insights 233 | 3. yslow 234 | 4. sway keys 235 | 5. adblocker 236 | 6. eye dropper 237 | 7. panda 238 | 8. onetab 239 | 9. hola 240 | 10. Chrome launcher app 241 | 242 | ### Sublime Text 3 243 | #### install package installer 244 | 1. ctrl+` # opens console in sublime, paste below into console. 245 | 2. `import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)` 246 | 247 | #### ST3 Packages 248 | 1. theme-default 249 | 2. brogrammer 250 | 3. sidebar-enhnacemnets 251 | 4. sidebar-folders 252 | 5. tabs-extra 253 | 6. alignment 254 | 7. codekit (.kit) 255 | 8. emmet 256 | 9. angularjs 257 | 10. sass 258 | 11. scss 259 | 12. docblocker 260 | 13. editorconfig 261 | 14. html-css-js-prettify 262 | 15. js hint 263 | 16. move tab 264 | 17. origami 265 | 18. markdown 266 | 19. movetab 267 | 20. unsplash 268 | 21. wordpress 269 | 22. sublimecodeintel 270 | 23. jekyll 271 | 24. trimmer 272 | 25. syncedSidebar 273 | 274 | ### Install Mackup 275 | `$ brew install mackup` 276 | 277 | ### Launch it and back up your files 278 | `$ mackup backup` 279 | 280 | ### Local OSX Yosemite Apache Setup 281 | In Yosemite, Apache 2.4.9 is installed. We just have to use the command line to start and stop it. 282 | 283 | One change compared to 2.2.x worth noting is that we now need the Require all granted directive in our virtual host definitions in place of Allow from all. 284 | 285 | ``` 286 | cd /etc/apache2 287 | subl /etc/apache2/httpd.conf 288 | ``` 289 | Within the httpd.conf: 290 | 291 | 1. To enable PHP and rewriting in Apache, remove the leading # from these lines: 292 | ``` 293 | #LoadModule rewrite_module libexec/apache2/mod_rewrite.so 294 | #LoadModule php5_module libexec/apache2/libphp5.so 295 | # Include /private/etc/apache2/extra/httpd-vhosts.conf 296 | ``` 297 | 298 | 2. Update yur file's Apache User/Group from `_www` to your `$(whoami)` and `staff` at around line 181-182. 299 | 300 | 3. At around line 236, you'll find the DocumentRoot and ``. Update both to: `/Users/$(whoami)/Localhost` or whichever destination you prefer. 301 | 302 | 4. Also, within ``, update `AllowOverride None` to `AllowOverride All` so that .htaccess files will work as well as `Options FollowSymLinks Multiviews` to `Options FollowSymLinks Multiviews Indexes` so that we can view directory listings. 303 | 304 | 5. Create a $(whoami).conf within the etc/apache2/users/ directory. 305 | ``` 306 | 307 | AllowOverride All 308 | Options Indexes MultiViews FollowSymLinks 309 | Require all granted 310 | 311 | ``` 312 | 313 | 4. Give yourself permissions to the /Users/$(whoami)/Localhost/ folder using these cli commands: 314 | ``` 315 | sudo chgrp staff /Users/$(whoami)/Localhost 316 | sudo chmod g+rws /Users/$(whoami)/Localhost 317 | sudo chmod g+rw /Users/$(whoami)/Localhost/* 318 | // or otherwise specifically...but the above should handle anything added from there on out 319 | sudo chmod -R g+w {path} 320 | ``` 321 | 322 | 5. Remove the content ( if you want ) from /etc/apache2/extra/httpd-vhosts.conf and add the code below before everything else 323 | ``` 324 | NameVirtualHost *:80 325 | ``` 326 | Followed by an example virtual host that points to the root of your web project directory e.g. Localhost 327 | ``` 328 | 329 | DocumentRoot "/Users/kiriaze/Localhost" 330 | 331 | ``` 332 | 333 | 6. Restart Apache: `sudo apachectl restart` 334 | 335 | 7. Create a new file called info.php with inside your new document root; e.g. /Users/$(whoami)/Localhost/. 336 | 337 | 8. Use your browser to navigate to `localhost/info.php` and check your PHP version, as well as anything else you might need to reference in the future. 338 | 339 | 340 | ## Notes 341 | 342 | 1. The init.sh script also installs a few other things such as: adobe-creative-cloud, MongoDB, Reddis, PostgreSQL - and you can setup your git global creds from the script as well. 343 | 344 | 2. Use [Ghosts](https://github.com/kiriaze/ghost) when creating new projects in conjuncture with this setup, and have a beer cuz you just became a fly ass mother fucker. A one liner to reference below: 345 | ``` 346 | bash <(curl -s https://raw.githubusercontent.com/kiriaze/ghosts/master/ghosts.sh) 347 | ``` 348 | 349 | ## Todos 350 | 351 | Include usage of MongoDB, Reddis, PostgreSQL. 352 | 353 | Consider dot files or a workaround for symlinking ( although osx deletes it on upgrade ) the httpd.conf file and others for local setup to prevent overwriting on OS upgrades - like el capitain.. 354 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Some things taken from here 4 | # https://github.com/mathiasbynens/dotfiles/blob/master/.osx 5 | 6 | pretty_print() { 7 | printf "\n%b\n" "$1" 8 | } 9 | 10 | checkFor() { 11 | type "$1" &> /dev/null ; 12 | } 13 | 14 | pretty_print "setting up your dev environment like a boss..." 15 | 16 | # Set continue to false by default 17 | CONTINUE=false 18 | 19 | pretty_print "\n###############################################" 20 | pretty_print "# DO NOT RUN THIS SCRIPT BLINDLY #" 21 | pretty_print "# YOU'LL PROBABLY REGRET IT... #" 22 | pretty_print "# #" 23 | pretty_print "# READ IT THOROUGHLY #" 24 | pretty_print "# AND EDIT TO SUIT YOUR NEEDS #" 25 | pretty_print "###############################################\n\n" 26 | 27 | pretty_print "Have you read through the script you're about to run and " 28 | pretty_print "understood that it will make changes to your computer? (y/n)" 29 | read -r response 30 | case $response in 31 | [yY]) CONTINUE=true 32 | break;; 33 | *) break;; 34 | esac 35 | 36 | if ! $CONTINUE; then 37 | # Check if we're continuing and output a message if not 38 | pretty_print "Please go read the script, it only takes a few minutes" 39 | exit 40 | fi 41 | 42 | # Here we go.. ask for the administrator password upfront and run a 43 | # keep-alive to update existing `sudo` time stamp until script has finished 44 | sudo -v 45 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 46 | 47 | 48 | ############################################################################### 49 | # General UI/UX 50 | ############################################################################### 51 | 52 | echo "\nWould you like to set your computer name (as done via System Preferences >> Sharing)? (y/n)" 53 | read -r response 54 | case $response in 55 | [yY]) 56 | echo "What would you like it to be?" 57 | read COMPUTER_NAME 58 | sudo scutil --set ComputerName $COMPUTER_NAME --set HostName $COMPUTER_NAME --set LocalHostName $COMPUTER_NAME 59 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $COMPUTER_NAME 60 | break;; 61 | *) break;; 62 | esac 63 | 64 | 65 | echo "" 66 | echo "Check for software updates daily, not just once per week" 67 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 68 | 69 | 70 | 71 | ################################################################################ 72 | # Trackpad, mouse, keyboard, Bluetooth accessories, and input 73 | ############################################################################### 74 | 75 | echo "" 76 | echo "Increasing sound quality for Bluetooth headphones/headsets" 77 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 78 | 79 | 80 | ############################################################################### 81 | # Finder 82 | ############################################################################### 83 | 84 | echo "" 85 | echo "Show hidden files in Finder by default? (y/n)" 86 | read -r response 87 | case $response in 88 | [yY]) 89 | defaults write com.apple.Finder AppleShowAllFiles -bool true 90 | break;; 91 | *) break;; 92 | esac 93 | 94 | echo "" 95 | echo "Show dotfiles in Finder by default? (y/n)" 96 | read -r response 97 | case $response in 98 | [yY]) 99 | defaults write com.apple.finder AppleShowAllFiles TRUE 100 | break;; 101 | *) break;; 102 | esac 103 | 104 | echo "" 105 | echo "Show all filename extensions in Finder by default? (y/n)" 106 | read -r response 107 | case $response in 108 | [yY]) 109 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 110 | break;; 111 | *) break;; 112 | esac 113 | 114 | echo "" 115 | echo "Use column view in all Finder windows by default? (y/n)" 116 | read -r response 117 | case $response in 118 | [yY]) 119 | defaults write com.apple.finder FXPreferredViewStyle Clmv 120 | break;; 121 | *) break;; 122 | esac 123 | 124 | echo "" 125 | echo "Avoid creation of .DS_Store files on network volumes? (y/n)" 126 | read -r response 127 | case $response in 128 | [yY]) 129 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 130 | break;; 131 | *) break;; 132 | esac 133 | 134 | 135 | echo "" 136 | echo "Allowing text selection in Quick Look/Preview in Finder by default" 137 | defaults write com.apple.finder QLEnableTextSelection -bool true 138 | 139 | 140 | echo "" 141 | echo "Enabling snap-to-grid for icons on the desktop and in other icon views" 142 | /usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 143 | /usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 144 | /usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist 145 | 146 | 147 | echo "" 148 | echo "Enabling the Develop menu and the Web Inspector in Safari" 149 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 150 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 151 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 152 | 153 | echo "\nAdding a context menu item for showing the Web Inspector in web views" 154 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 155 | 156 | # Use current directory as default search scope in Finder 157 | echo "\nUse current directory as default search scope in Finder" 158 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 159 | 160 | # Show Path bar in Finder 161 | echo "\nShow Path bar in Finder" 162 | defaults write com.apple.finder ShowPathbar -bool true 163 | 164 | # Show Status bar in Finder 165 | echo "\nShow Status bar in Finder" 166 | defaults write com.apple.finder ShowStatusBar -bool true 167 | 168 | # Show indicator lights for open applications in the Dock 169 | echo "\nShow indicator lights for open applications in the Dock" 170 | defaults write com.apple.dock show-process-indicators -bool true 171 | 172 | # Set a blazingly fast keyboard repeat rate 173 | echo "\nSet a blazingly fast keyboard repeat rate" 174 | defaults write NSGlobalDomain KeyRepeat -int 1 175 | 176 | # Set a shorter Delay until key repeat 177 | echo "\nSet a shorter Delay until key repeat" 178 | defaults write NSGlobalDomain InitialKeyRepeat -int 12 179 | 180 | # Show the ~/Library folder 181 | echo "\nShow the ~/Library folder" 182 | chflags nohidden ~/Library 183 | 184 | 185 | ############################################################################### 186 | # Mail 187 | ############################################################################### 188 | 189 | echo "" 190 | echo "Setting email addresses to copy as 'foo@example.com' instead of 'Foo Bar ' in Mail.app" 191 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false 192 | 193 | ############################################################################### 194 | # Terminal 195 | ############################################################################### 196 | 197 | echo "" 198 | echo "Enabling UTF-8 ONLY in Terminal.app and setting the Pro theme by default" 199 | defaults write com.apple.terminal StringEncodings -array 4 200 | defaults write com.apple.Terminal "Default Window Settings" -string "Pro" 201 | defaults write com.apple.Terminal "Startup Window Settings" -string "Pro" 202 | 203 | ############################################################################### 204 | # Time Machine 205 | ############################################################################### 206 | 207 | echo "" 208 | echo "Prevent Time Machine from prompting to use new hard drives as backup volume? (y/n)" 209 | read -r response 210 | case $response in 211 | [yY]) 212 | defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true 213 | break;; 214 | *) break;; 215 | esac 216 | 217 | ############################################################################### 218 | # Transmission.app # 219 | ############################################################################### 220 | 221 | echo "" 222 | echo "Do you use Transmission for torrenting? (y/n)" 223 | read -r response 224 | case $response in 225 | [yY]) 226 | echo "" 227 | echo "Use `~/Downloads/Incomplete` to store incomplete downloads" 228 | defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true 229 | mkdir -p ~/Downloads/Incomplete 230 | defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Downloads/Incomplete" 231 | 232 | echo "" 233 | echo "Don't prompt for confirmation before downloading" 234 | defaults write org.m0k.transmission DownloadAsk -bool false 235 | 236 | echo "" 237 | echo "Trash original torrent files" 238 | defaults write org.m0k.transmission DeleteOriginalTorrent -bool true 239 | 240 | echo "" 241 | echo "Hide the donate message" 242 | defaults write org.m0k.transmission WarningDonate -bool false 243 | 244 | echo "" 245 | echo "Hide the legal disclaimer" 246 | defaults write org.m0k.transmission WarningLegal -bool false 247 | break;; 248 | *) break;; 249 | esac 250 | 251 | ############################################################################### 252 | # Sublime Text 253 | ############################################################################### 254 | 255 | echo "" 256 | echo "Do you use Sublime Text 3 as your editor of choice, and is it installed? (y/n)" 257 | read -r response 258 | case $response in 259 | [yY]) 260 | # Link subl command to sublime text 261 | echo "" 262 | echo "Linking Sublime Text for command line usage as subl" 263 | ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl 264 | break;; 265 | *) break;; 266 | esac 267 | 268 | # xcode dev tools 269 | pretty_print "Installing xcode dev tools..." 270 | if [ "$(checkFor pkgutil --pkg-info=com.apple.pkg.CLTools_Executables)" ]; then 271 | printf 'Command-Line Tools is not installed. Installing..' ; 272 | xcode-select --install 273 | sleep 1 274 | osascript -e 'tell application "System Events"' -e 'tell process "Install Command Line Developer Tools"' -e 'keystroke return' -e 'click button "Agree" of window "License Agreement"' -e 'end tell' -e 'end tell' 275 | fi 276 | 277 | ## xquartz 278 | pretty_print "Installing xquartz..." 279 | curl http://xquartz-dl.macosforge.org/SL/XQuartz-2.7.7.dmg -o /tmp/XQuartz.dmg 280 | open /tmp/XQuartz.dmg 281 | sudo installer -package /Volumes/XQuartz-2.7.7/XQuartz.pkg -target / 282 | hdiutil detach /Volumes/XQuartz-2.7.7 283 | 284 | # Oh my zsh installation 285 | pretty_print "Installing oh-my-zsh..." 286 | curl -L http://install.ohmyz.sh | sh 287 | 288 | # zsh fix 289 | if [[ -f /etc/zshenv ]]; then 290 | pretty_print "Fixing OSX zsh environment bug ..." 291 | sudo mv /etc/{zshenv,zshrc} 292 | fi 293 | 294 | # Homebrew installation 295 | 296 | if ! command -v brew &>/dev/null; then 297 | pretty_print "Installing Homebrew, an OSX package manager, follow the instructions..." 298 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 299 | 300 | if ! grep -qs "recommended by brew doctor" ~/.zshrc; then 301 | pretty_print "Put Homebrew location earlier in PATH ..." 302 | printf '\n# recommended by brew doctor\n' >> ~/.zshrc 303 | printf 'export PATH="/usr/local/bin:$PATH"\n' >> ~/.zshrc 304 | export PATH="/usr/local/bin:$PATH" 305 | fi 306 | else 307 | pretty_print "You already have Homebrew installed...good job!" 308 | fi 309 | 310 | # Homebrew OSX libraries 311 | 312 | pretty_print "Updating brew formulas" 313 | brew update 314 | 315 | pretty_print "Installing GNU core utilities..." 316 | brew install coreutils 317 | 318 | pretty_print "Installing GNU find, locate, updatedb and xargs..." 319 | brew install findutils 320 | 321 | pretty_print "Installing the most recent verions of some OSX tools" 322 | brew tap homebrew/dupes 323 | brew install homebrew/dupes/grep 324 | 325 | printf 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"' >> ~/.zshrc 326 | export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" 327 | 328 | # Git installation 329 | pretty_print "Installing git for control version" 330 | brew install git 331 | 332 | # Git setup 333 | pretty_print "Setting up .gitconfig... (y/n)" 334 | # Write settings to ~/.gitconfig 335 | read -r response 336 | case $response in 337 | [yY]) 338 | echo "What name would you like use?" 339 | read NAME 340 | # $NAME for usage 341 | git config --global user.name $NAME 342 | 343 | echo "What email would you like use?" 344 | read EMAIL 345 | # $EMAIL for usage 346 | git config --global user.email $EMAIL 347 | 348 | # a global git ignore file: 349 | git config --global core.excludesfile '~/.gitignore' 350 | echo '.DS_Store' >> ~/.gitignore 351 | 352 | # use keychain for storing passwords 353 | git config --global credential.helper osxkeychain 354 | 355 | # you might not see colors without this 356 | git config --global color.ui true 357 | 358 | echo "more useful settings can be found here: https://github.com/glebm/dotfiles/blob/master/.gitconfig" 359 | 360 | # ssh keys - probably can skip this since github app auto adds it for you which is nice 361 | ls -al ~/.ssh # Lists the files in your .ssh directory, if they exist 362 | ssh-keygen -t rsa -C $EMAIL # Creates a new ssh key, using the provided email as a label 363 | eval "$(ssh-agent -s)" # start the ssh-agent in the background 364 | ssh-add ~/.ssh/id_rsa 365 | pbcopy < ~/.ssh/id_rsa.pub # Copies the contents of the id_rsa.pub file to your clipboard to paste in github or w/e 366 | 367 | break;; 368 | *) break;; 369 | esac 370 | 371 | # Image magick installation 372 | pretty_print "Installing image magick for image processing" 373 | brew install imagemagick 374 | 375 | # php 376 | pretty_print "Installing php 5.6..." 377 | brew tap homebrew/versions 378 | brew tap homebrew/homebrew-php 379 | brew install php56 380 | echo 'export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"' >> ~/.zshrc && . ~/.zshrc 381 | pretty_print "Setup auto start" 382 | mkdir -p ~/Library/LaunchAgents 383 | cp /usr/local/Cellar/php56/5.6.2/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/ 384 | 385 | # mysql/mariadb 386 | pretty_print "Installing mysql..." 387 | brew install mysql 388 | brew unlink mysql 389 | pretty_print "Installing mariadb..." 390 | brew install mariadb # Install MariaDB 391 | # mysql setup auto start and start the database 392 | ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents 393 | launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist 394 | # Run the Database Installer 395 | unset TMPDIR 396 | cd /usr/local/Cellar/mariadb/{VERSION} 397 | mysql_install_db 398 | mysql.server start # Start MariaDB 399 | mysql_secure_installation # Secure the Installation 400 | 401 | # MongoDB installation 402 | pretty_print "Installing MongoDB" 403 | brew install mongo 404 | 405 | # Reddis installation 406 | pretty_print "Installing Reddis" 407 | brew install redis 408 | 409 | # PostgreSQL installation 410 | pretty_print "Installing PostgreSQL" 411 | brew install postgresql 412 | 413 | # Rbenv installation 414 | pretty_print "Rbenv installation for managing your rubies" 415 | brew install rbenv 416 | 417 | if ! grep -qs "rbenv init" ~/.zshrc; then 418 | printf 'export PATH="$HOME/.rbenv/bin:$PATH"\n' >> ~/.zshrc 419 | printf 'eval "$(rbenv init - --no-rehash)"\n' >> ~/.zshrc 420 | 421 | pretty_print "Enable shims and autocompletion ..." 422 | eval "$(rbenv init -)" 423 | fi 424 | 425 | 426 | export PATH="$HOME/.rbenv/bin:$PATH" 427 | 428 | pretty_print "Installing rbenv-gem-rehash, we don't want to rehash everytime we add a gem..." 429 | brew install rbenv-gem-rehash 430 | 431 | pretty_print "Installing ruby-build to install Rubies ..." 432 | brew install ruby-build 433 | 434 | # OpenSSL linking 435 | pretty_print "Installing and linking OpenSSL..." 436 | brew install openssl 437 | brew link openssl --force 438 | 439 | # Install ruby latest version 440 | ruby_version="$(curl -sSL https://raw.githubusercontent.com/IcaliaLabs/kaishi/master/latest_ruby)" 441 | 442 | pretty_print "Installing Ruby $ruby_version" 443 | if [ "$ruby_version" = "2.1.1" ]; then 444 | curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1 445 | else 446 | rbenv install "$ruby_version" 447 | fi 448 | 449 | pretty_print "Set ruby version $ruby_version as the default" 450 | 451 | rbenv global "$ruby_version" 452 | rbenv rehash 453 | 454 | pretty_print "Updating gems..." 455 | gem update --system 456 | 457 | pretty_print "Setup gemrc for default options" 458 | if [ ! -f ~/.gemrc ]; then 459 | printf 'gem: --no-document' >> ~/.gemrc 460 | fi 461 | 462 | # Bundler installation 463 | pretty_print "Installing bundler..." 464 | gem install bundler 465 | # 466 | pretty_print "Optimizing Bundler..." 467 | number_of_cores=$(sysctl -n hw.ncpu) 468 | bundle config --global jobs $((number_of_cores - 1)) 469 | 470 | pretty_print "Installing Foreman..." 471 | gem install foreman 472 | 473 | pretty_print "Installing Rails...finally!" 474 | gem install rails 475 | 476 | pretty_print "Installing mailcatcher gem...!" 477 | gem install mailcatcher 478 | 479 | pretty_print "Installing the heroku toolbelt..." 480 | brew install heroku-toolbelt 481 | 482 | pretty_print "Installing custom Rails app generator from Icalia" 483 | curl -L https://raw2.github.com/IcaliaLabs/railsAppCustomGenerator/master/install.sh | sh 484 | 485 | pretty_print "Installing pow to serve local rails apps like a superhero..." 486 | # Making Pow and PHP work together nicely... 487 | echo 'export POW_DST_PORT=88' >> ~/.powconfig 488 | sudo curl -L https://gist.githubusercontent.com/soupmatt/1058580/raw/zzz_pow.conf -o /private/etc/apache2/other/zzz_pow.conf 489 | sudo apachectl restart 490 | # Installing POW 491 | curl get.pow.cx | sh 492 | 493 | pretty_print "Installing NodeJs..." 494 | brew install node 495 | 496 | pretty_print "Installing Grunt..." 497 | npm install -g grunt-cli 498 | 499 | pretty_print "Installing Composer..." 500 | brew update 501 | brew install composer 502 | 503 | pretty_print "Installing Bower..." 504 | npm install -g bower 505 | 506 | pretty_print "Installing Gulp..." 507 | npm install --global gulp 508 | 509 | # Install brew cask 510 | pretty_print "Installing cask to install apps" 511 | brew install caskroom/cask/brew-cask 512 | brew tap caskroom/versions 513 | 514 | pretty_print "Installing launchrocket to manage your homebrew formulas like a champ!" 515 | brew cask install launchrocket 516 | 517 | pretty_print "Installing apps..." 518 | sh apps.sh 519 | 520 | pretty_print "Installing fonts..." 521 | sh fonts.sh 522 | 523 | # install adove creative cloud app from cask install 524 | pretty_print "Adobe Creative Cloud - cask requires to run the installer again" 525 | open /opt/homebrew-cask/Caskroom/adobe-creative-cloud/latest/Creative\ Cloud\ Installer.app 526 | 527 | # when done with cask 528 | brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup 529 | 530 | # iterm - copy files into ~ dir 531 | pretty_print "Setup iterm..." 532 | cp {.bash_profile,.bash_prompt,.aliases} ~ 533 | 534 | # Install Mackup 535 | pretty_print "Installing Mackup..." 536 | brew install mackup 537 | 538 | # Launch it and back up your files 539 | pretty_print "Running Mackup Backup...required dropbox to be setup first. Run again with $mackup backup" 540 | mackup backup 541 | 542 | ############################################################################### 543 | # Kill affected applications 544 | ############################################################################### 545 | 546 | echo "" 547 | pretty_print "Shits Done Bro! You still need to manually install pacakge installer within sublime, setup your hosts, httpd.conf and vhosts files, download chrome extensions, setup your hotspots/mouse settings, and setup your git shit - look at readme for more info." 548 | echo "" 549 | echo "" 550 | pretty_print "################################################################################" 551 | echo "" 552 | echo "" 553 | pretty_print "Note that some of these changes require a logout/restart to take effect." 554 | pretty_print "Killing some open applications in order to take effect." 555 | echo "" 556 | 557 | find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete 558 | for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ 559 | "Dock" "Finder" "Mail" "Messages" "Safari" "SystemUIServer" \ 560 | "Terminal" "Transmission"; do 561 | killall "${app}" > /dev/null 2>&1 562 | done 563 | --------------------------------------------------------------------------------