Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.