Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Starting point for a script to setup development environment (MAMP)
# chmod a+x
# General functionality
brew install git
brew install openssl
brew install node
brew install npm
brew install yarn
brew install bat
# Install PHP and composer
brew install php@7.2
brew install composer
# Configure Database
brew install mariadb # or mysql
brew services start mariadb # or mysql
echo '[mysqld]' >> /usr/local/etc/my.cnf
echo '[client]' >> /usr/local/etc/my.cnf
echo 'user=root' >> /usr/local/etc/my.cnf
echo 'password=root' >> /usr/local/etc/my.cnf
# Config GIT
git config --global "Firstname Lastname"
git config --global
git config --global core.editor mate
# Setup Valet
composer global require laravel/valet
valet install
cd ~/Sites/xxx && valet park xxx
# Configure DNS
brew install dnsmasq
echo 'address=/.test/' >> /usr/local/etc/dnsmasq.conf
echo 'address=/.dev/' >> /usr/local/etc/dnsmasq.conf
echo 'address=/.localhost/' >> /usr/local/etc/dnsmasq.conf
echo 'address=/.example/' >> /usr/local/etc/dnsmasq.conf
mkdir -v /etc/resolver
bash -c 'echo "nameserver" > /etc/resolver/test'
bash -c 'echo "nameserver" > /etc/resolver/dev'
bash -c 'echo "nameserver" > /etc/resolver/localhost'
bash -c 'echo "nameserver" > /etc/resolver/example'
sudo brew services start dnsmasq
# Yarn
yarn global add @vue/cli
yarn global add @vue/cli-service-global
# Redis
brew install redis
brew services start redis
# Git Config
git config --global help.autocorrect 1
git config --global alias.alias "config --get-regexp ^alias\."
git config --global alias.pushall '!git remote | xargs -L1 git push'
# Oh My ZSH, see
sh -c "$(curl -fsSL"
brew install zsh-syntax-highlighting
sed -i -e 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/g' ~/.zshrc
echo 'DEFAULT_USER="trovster"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
echo 'export CLICOLOR=1' >> ~/.zshrc
echo 'export LSCOLORS=GxFxCxDxBxegedabagaced' >> ~/.zshrc
echo 'alias zshconfig="mate ~/.zshrc"' ~/.zshrc
echo 'alias ohmyzsh="mate ~/.oh-my-zsh"' ~/.zshrc
echo 'alias brewup="brew update; brew upgrade; brew prune; brew cleanup; brew doctor"' ~/.zshrc
echo 'alias ls="ls -la -h -Gp -F"' ~/.zshrc
echo 'alias grep="grep -n --color"' ~/.zshrc
echo 'alias ping="ping -c 5"' ~/.zshrc
echo 'alias cls="clear"' ~/.zshrc
echo 'alias bat="cat"' ~/.zshrc
echo 'source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ~/.zshrc
# Information
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.