Skip to content

Instantly share code, notes, and snippets.

@Shipu
Forked from itsmelion/config.sh
Created July 16, 2018 18:23
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 Shipu/fd12b238bcfa20fbbe65cde41fa823b5 to your computer and use it in GitHub Desktop.
Save Shipu/fd12b238bcfa20fbbe65cde41fa823b5 to your computer and use it in GitHub Desktop.
Mac OSX SUPER-Configuration
#!/bin/sh
# xcode command line - Select: "Get xcode" and go get a coffee (preferably far from your desk :)
xcode-select --install
# homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# will ask to install the command line tools for macOS if the previous step was not executed
brew tap caskroom/cask
brew tap caskroom/versions
brew tap homebrew/dupes
brew tap homebrew/versions
brew update
brew upgrade
brew install wget automake cmake libtool libpng openssl pkg-config
brew cask install iterm2-beta
brew install zsh
brew install zsh-completions
# Browsers - optional
brew cask install google-chrome
brew cask install google-chrome-canary
brew cask install firefox-nightly
brew cask install safari-technology-preview
# Web Development Tools
brew install node
brew install mariadb
brew tap homebrew/homebrew-php
brew tap homebrew/php
brew install php --with-fpm
brew cask install mysqlworkbench
brew install composer
# Visual Studio Code
brew cask install visual-studio-code-insiders
# NPM
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
npm i -g babel-cli browser-sync gulp-cli jshint webpack node-sass tslint typescript imagemin-webpack-plugin imagemin-mozjpeg imagemin eslint @angular/cli@next
brew cask install slack
brew cask install skype-preview
brew cask install spotify
# Nginx
brew install nginx
mkdir -p ~/sites
sudo chown :staff ~/sites
sudo chmod 775 ~/sites
mkdir -p ~/nginx/logs
mkdir -p ~/nginx/sites-enabled
mkdir -p ~/nginx/conf.d
mkdir -p ~/nginx/sites-available
mkdir -p ~/nginx/ssl
sudo mkdir -p /var/www
ln -sfv ~/nginx/logs /usr/local/etc/nginx/logs
ln -sfv ~/nginx/sites-available /usr/local/etc/nginx/sites-available
ln -sfv ~/nginx/sites-enabled /usr/local/etc/nginx/sites-enabled
ln -sfv ~/nginx/conf.d /usr/local/etc/nginx/conf.d
ln -sfv ~/nginx/ssl /usr/local/etc/nginx/ssl
sudo ln -sfv ~/sites /var/www
sudo rm /usr/local/etc/nginx/nginx.conf
curl -L https://gist.githubusercontent.com/itsmelion/a16f7cc549d80a1ea6548a730c952deb/raw/9875a9908cb7d31ff76ff0a542676dd78072ad23/nginx.conf -o ~/nginx/nginx.conf
ln -sfv ~/nginx/nginx.conf /usr/local/etc/nginx/nginx.conf
# nginx/php-fpm
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/php-fpm -o ~/nginx/conf.d/php-fpm
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj '/C=US/ST=State/L=Town/O=Office/CN=localhost' -keyout ~/nginx/ssl/localhost.key -out ~/nginx/ssl/localhost.crt
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/sites-available_default -o ~/nginx/sites-available/default
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/sites-available_default-ssl -o ~/nginx/sites-available/default-ssl
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/www/phpinfo.php -o ~/sites/phpinfo.php
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/www/403.html -o ~/sites/403.html
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/www/404.html -o ~/sites/404.html
curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/www/index.html -o ~/sites/index.html
# Git
brew cask install gitkraken
brew install git
echo "Git User: "
read username
git config --global user.name "$username"
echo "Define your Git email"
read email
git config --global user.email "$email"
npm login
# zsh and iterm2
echo 'fpath=(/usr/local/share/zsh-completions $fpath)' >> ~/.zshrc
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo 'fine.. now install Photoshop, WhatsApp and Trello.. then you are ready'
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment