Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matt-bailey
Forked from kevyworks/prep-ncv-env.sh
Created April 23, 2018 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt-bailey/bbeb19bdcaff2b733643740486306441 to your computer and use it in GitHub Desktop.
Save matt-bailey/bbeb19bdcaff2b733643740486306441 to your computer and use it in GitHub Desktop.
Prepare Dev Machine for: Node Composer & Laravel Valet
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# update brew
brew update
# should be added by homebrew installation?
sudo chown -R `whoami`:admin /usr/local/opt
# Node Version Manager
brew install nvm
mkdir ~/.nvm
echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.bash_profile
source ~/.bash_profile
nvm install --lts
# Global NPM libraries
# https://github.com/localtunnel/localtunnel
# https://gist.github.com/kevmt/f897580e05aca323f30692076c46cb27
npm install -g localtunnel
# Mysql
brew install mysql
# Redis
# /usr/local/etc/redis.conf
brew install redis
# Git
brew install git
# Composer, PHP
brew install composer
brew install php71
echo 'export PATH="/usr/local/opt/php@7.1/bin:~/.composer/vendor/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
brew link php@7.1 --overwrite --force
# Valet
composer global require laravel/valet
# as of 04-05-2018 fix it directly
# nano ~/.composer/vendor/laravel/valet/cli/Valet/Brew.php
# @line 185, replace to:
# return strpos(preg_replace('/([@|\.])/', '', $resolvedPath), "/$version/") !== false;
brew services restart --all
# or restart your computer.
# Note that valet installs nginx & dnsmasq as root so you need
# sudo brew services restart --all
# Install Valet
valet install
# Install Tools
brew install visual-studio-code
brew install caskroom/cask/google-chrome
# Android?
# brew install caskroom/cask/android-platform-tools
# brew install caskroom/cask/android-studio
# More... ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment