Skip to content

Instantly share code, notes, and snippets.

@itsmelion
Last active July 16, 2018 18:23
Show Gist options
  • Select an option

  • Save itsmelion/d670b6c63508c4a8c9e62f82667357ee to your computer and use it in GitHub Desktop.

Select an option

Save itsmelion/d670b6c63508c4a8c9e62f82667357ee to your computer and use it in GitHub Desktop.

Revisions

  1. Christhopher Lion revised this gist Feb 28, 2018. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ brew install node
    brew install mariadb
    brew tap homebrew/homebrew-php
    brew tap homebrew/php
    brew install php72 --with-fpm
    brew install php --with-fpm
    brew cask install mysqlworkbench
    brew install composer

    @@ -46,8 +46,6 @@ brew cask install slack
    brew cask install skype-preview
    brew cask install spotify

    brew install phpmyadmin

    # Nginx
    brew install nginx
    mkdir -p ~/sites
  2. Christhopher Lion revised this gist Feb 19, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.sh
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ brew install node
    brew install mariadb
    brew tap homebrew/homebrew-php
    brew tap homebrew/php
    brew install php71 --with-fpm
    brew install php72 --with-fpm
    brew cask install mysqlworkbench
    brew install composer

  3. Christhopher Lion revised this gist Feb 15, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion config.sh
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,8 @@ brew upgrade
    brew install wget automake cmake libtool libpng openssl pkg-config

    brew cask install iterm2-beta
    brew install zsh zsh-completions
    brew install zsh
    brew install zsh-completions

    # Browsers - optional
    brew cask install google-chrome
  4. Christhopher Lion revised this gist Feb 14, 2018. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion config.sh
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,9 @@ 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 skype-preview spotify
    brew cask install slack
    brew cask install skype-preview
    brew cask install spotify

    brew install phpmyadmin

  5. Christhopher Lion revised this gist Feb 14, 2018. 1 changed file with 15 additions and 15 deletions.
    30 changes: 15 additions & 15 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -14,11 +14,8 @@ brew update
    brew upgrade
    brew install wget automake cmake libtool libpng openssl pkg-config

    # zsh and iterm2
    brew cask install iterm2-beta
    brew install zsh zsh-completions
    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)"

    # Browsers - optional
    brew cask install google-chrome
    @@ -50,20 +47,20 @@ brew install phpmyadmin

    # Nginx
    brew install nginx
    mkdir -p ~/sites
    sudo chown :staff ~/sites
    sudo chmod 775 ~/sites
    mkdir -p ~/nginx/logs
    ln -sfv ~/nginx/logs /usr/local/etc/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
    mkdir -p ~/nginx/sites-enabled
    ln -sfv ~/nginx/sites-enabled /usr/local/etc/nginx/sites-enabled
    mkdir -p ~/nginx/conf.d
    ln -sfv ~/nginx/conf.d /usr/local/etc/nginx/conf.d
    mkdir -p ~/nginx/ssl
    ln -sfv ~/nginx/ssl /usr/local/etc/nginx/ssl
    sudo mkdir -p /var/www

    sudo chown :staff ~/sites
    sudo chmod 775 ~/sites
    sudo ln -sfv ~/sites /var/www

    sudo rm /usr/local/etc/nginx/nginx.conf
    @@ -76,8 +73,8 @@ curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/php-fpm -o ~/

    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 ~/sites/nginx/sites-available/default
    curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/sites-available_default-ssl -o ~/sites/nginx/sites-available/default-ssl
    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
    @@ -93,9 +90,12 @@ echo "Define your Git email"
    read email
    git config --global user.email "$email"

    mysql_secure_installation
    npm login

    # zsh and iterm2

    npm login
    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
  6. Christhopher Lion revised this gist Feb 14, 2018. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ brew tap homebrew/dupes
    brew tap homebrew/versions
    brew update
    brew upgrade
    brew install wget autoconf automake cmake libtool gettext icu4c libpng libidn2 libunistring openssl pkg-config
    brew install wget automake cmake libtool libpng openssl pkg-config

    # zsh and iterm2
    brew cask install iterm2-beta
    @@ -31,7 +31,7 @@ brew install node
    brew install mariadb
    brew tap homebrew/homebrew-php
    brew tap homebrew/php
    brew install php71
    brew install php71 --with-fpm
    brew cask install mysqlworkbench
    brew install composer

    @@ -51,20 +51,25 @@ brew install phpmyadmin
    # Nginx
    brew install nginx
    mkdir -p ~/nginx/logs
    ln -sfv ~/nginx/logs /usr/local/etc/nginx/logs
    mkdir -p ~/nginx/sites-available
    ln -sfv ~/nginx/sites-available /usr/local/etc/nginx/sites-available
    mkdir -p ~/nginx/sites-enabled
    ln -sfv ~/nginx/sites-enabled /usr/local/etc/nginx/sites-enabled
    mkdir -p ~/nginx/conf.d
    ln -sfv ~/nginx/conf.d /usr/local/etc/nginx/conf.d
    mkdir -p ~/nginx/ssl
    ln -sfv ~/nginx/ssl /usr/local/etc/nginx/ssl
    sudo mkdir -p /var/www
    ln -sfv ~/nginx ~/sites

    sudo chown :staff ~/sites
    sudo chmod 775 ~/sites
    sudo ln -sfv ~/sites /var/www

    rm /usr/local/etc/nginx/nginx.conf
    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 /usr/local/etc/nginx/nginx.conf ~/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
  7. Christhopher Lion revised this gist Feb 14, 2018. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,7 @@ brew tap homebrew/dupes
    brew tap homebrew/versions
    brew update
    brew upgrade
    brew install wget autoconf automake cmake libtool gettext icu4c libpng libidn2 libunistring openssl pkg-config

    # zsh and iterm2
    brew cask install iterm2-beta
    @@ -32,12 +33,16 @@ brew tap homebrew/homebrew-php
    brew tap homebrew/php
    brew install php71
    brew cask install mysqlworkbench
    brew install composer

    # Visual Studio Code
    brew cask install visual-studio-code-insiders

    # Angular CLI & Nativescript
    npm i -g @angular/cli
    # 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 skype-preview spotify

    @@ -85,5 +90,7 @@ git config --global user.email "$email"

    mysql_secure_installation

    npm login

    echo 'fine.. now install Photoshop, WhatsApp and Trello.. then you are ready'
    exit 1
  8. Christhopher Lion revised this gist Feb 14, 2018. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -58,8 +58,7 @@ sudo chmod 775 ~/sites

    rm /usr/local/etc/nginx/nginx.conf

    #TODO Use my config
    curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/nginx.conf -o ~/nginx/nginx.conf
    curl -L https://gist.githubusercontent.com/itsmelion/a16f7cc549d80a1ea6548a730c952deb/raw/9875a9908cb7d31ff76ff0a542676dd78072ad23/nginx.conf -o ~/nginx/nginx.conf
    ln -sfv /usr/local/etc/nginx/nginx.conf ~/nginx/nginx.conf

    # nginx/php-fpm
  9. Christhopher Lion created this gist Feb 14, 2018.
    90 changes: 90 additions & 0 deletions config.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,90 @@
    #!/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

    # zsh and iterm2
    brew cask install iterm2-beta
    brew install zsh zsh-completions
    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)"

    # 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 php71
    brew cask install mysqlworkbench

    # Visual Studio Code
    brew cask install visual-studio-code-insiders

    # Angular CLI & Nativescript
    npm i -g @angular/cli

    brew cask install slack skype-preview spotify

    brew install phpmyadmin

    # Nginx
    brew install nginx
    mkdir -p ~/nginx/logs
    mkdir -p ~/nginx/sites-available
    mkdir -p ~/nginx/sites-enabled
    mkdir -p ~/nginx/conf.d
    mkdir -p ~/nginx/ssl
    sudo mkdir -p /var/www
    ln -sfv ~/nginx ~/sites

    sudo chown :staff ~/sites
    sudo chmod 775 ~/sites

    rm /usr/local/etc/nginx/nginx.conf

    #TODO Use my config
    curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/nginx.conf -o ~/nginx/nginx.conf
    ln -sfv /usr/local/etc/nginx/nginx.conf ~/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 ~/sites/nginx/sites-available/default
    curl -L https://raw.githubusercontent.com/hongshunyang/mnmp/master/sites-available_default-ssl -o ~/sites/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"

    mysql_secure_installation

    echo 'fine.. now install Photoshop, WhatsApp and Trello.. then you are ready'
    exit 1