Last active
March 19, 2017 23:02
-
-
Save landsman/3522fcf5add4c7696b6383c2eb7d3af7 to your computer and use it in GitHub Desktop.
Developer stuffs on macOS by one command :-) --- In progress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# todo: questions like: Are you using drupal, wordpress, etc and install their CLI | |
# create working dir | |
mkdir developer-tmp | |
# brew | |
echo "Install Brew manager" | |
ruby \ | |
-e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" \ | |
</dev/null | |
# is update and ready? | |
brew update | |
brew doctor | |
# add Homebrew's location to your $PATH in your .bash_profile or .zshrc file. | |
#export PATH="/usr/local/bin:$PATH" | |
echo "PATH=\$(echo \$PATH | sed 's|/usr/local/bin||; s|/usr/local/sbin||; s|::|:|; s|^:||; s|\(.*\)|/usr/local/bin:/usr/local/sbin:\1|')" >> ~/.bash_profile && source ~/.bash_profile | |
# nodejs and npm stuffs | |
brew install node | |
npm install gulp-cli -g | |
npm install gulp -D | |
# GIT | |
brew install git | |
# MAMP PRO | |
curl -o MAMPPRO.dmg "http://downloads8.mamp.info/MAMP-PRO/releases/4.1.1/MAMP_MAMP_PRO_4.1.1.pkg" | |
sudo hdiutil attach MAMPPRO.dmg | |
# todo: install it and move to apps | |
# composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
mv composer.phar /usr/local/bin/composer | |
# ftp/ssh tools | |
brew cask install filezilla | |
# phpStorm - todo: chose from last 3 versions (licence stuff) | |
curl -o phpstorm.dmg "http://download.jetbrains.com/webide/PhpStorm-9.0.3.dmg" | |
sudo hdiutil attach phpstorm.dmg | |
# code, front-end tools | |
curl -o atom.zip "https://atom.io/download/mac" | |
unzip atom.zip -d ~/Applications/ | |
brew cask install avocode | |
# todo: sublime text 3 | |
# install hyper term | |
curl -o hyper.dmg "https://hyper-updates.now.sh/download/mac" | |
sudo hdiutil attach hyper.dmg | |
# install IMs | |
brew install slack | |
brew cask install skype | |
brew install Caskroom/cask/limechat | |
# browsers | |
brew install Caskroom/cask/firefox | |
brew install Caskroom/cask/opera | |
brew install Caskroom/cask/opera-neon | |
# fun must be! | |
brew cask install spotify | |
# --- Setup --- | |
echo "Fill git user.name:" | |
gitusername="$(read)" | |
echo "Fill git user.email:" | |
gitemail="$(read)" | |
git config --global user.name "${gitusername}" | |
git config --global user.email "${gitemail}" | |
defaults write com.apple.finder AppleShowAllFiles YES | |
echo "set completion-ignore-case On" >> ~/.inputrc | |
# MAMP stuffs | |
echo "source ~/.profile" >> ~/.bash_profile | |
echo "export PATH=/usr/local/bin:$PATH" >> ~/.bash_profile | |
# credits http://stackoverflow.com/a/29990624 | |
echo "# Use MAMP version of PHP" >> ~/.bash_profile | |
echo "PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`" >> ~/.bash_profile | |
echo "export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH" >> ~/.bash_profile | |
echo "# Export MAMP MySQL executables as functions" >> ~/.bash_profile | |
echo "# Makes them usable from within shell scripts (unlike an alias)" >> ~/.bash_profile | |
echo "mysql() {" >> ~/.bash_profile | |
echo " /Applications/MAMP/Library/bin/mysql '$@" >> ~/.bash_profile | |
echo "}" >> ~/.bash_profile | |
echo "mysqladmin() {" >> ~/.bash_profile | |
echo " /Applications/MAMP/Library/bin/mysqladmin '$@'" >> ~/.bash_profile | |
echo "}" >> ~/.bash_profile | |
echo "export -f mysql" >> ~/.bash_profile | |
echo "export -f mysqladmin" >> ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment