<repo_name>Lopesgit/homestead<file_sep>/scripts/install-pma.sh
#!/bin/bash

export DEBIAN_FRONTEND=noninteractive

PMA_VERSION=$1;
PMA_PHP_VERSION=$2

echo 'Downloading phpMyAdmin'
curl -#L https://files.phpmyadmin.net/phpMyAdmin/$PMA_VERSION/phpMyAdmin-$PMA_VERSION-all-languages.tar.gz -o phpmyadmin.tar.gz

mkdir phpmyadmin && tar xf phpmyadmin.tar.gz -C phpmyadmin --strip-components 1

cp $(pwd)/phpmyadmin/config.sample.inc.php $(pwd)/phpmyadmin/config.inc.php

sed -i "s/$cfg\['blowfish_secret'\] = ''/$cfg\['blowfish_secret'\] = '$(php -r  "echo sha1(uniqid(rand(), true));")'/" $(pwd)/phpmyadmin/config.inc.php

mkdir $(pwd)/phpmyadmin/tmp

mysql -uhomestead -psecret < phpmyadmin/sql/create_tables.sql

rm phpmyadmin.tar.gz

CMD=/vagrant/scripts/serve-laravel.sh
CMD_CERT=/vagrant/scripts/create-certificate.sh

if [ ! -f $CMD ]; then
    # Fallback for older Homestead versions
    CMD=/vagrant/scripts/serve.sh
else
    # Create an SSL certificate
    sudo bash $CMD_CERT phpmyadmin.web
fi

sudo bash $CMD phpmyadmin.web $(pwd)/phpmyadmin 80 443 $PMA_PHP_VERSION

sudo service nginx reload<file_sep>/scripts/install-zsh.sh
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive

# Check If Zsh Has Been Installed
if [ -f /home/vagrant/.zshrc ]
then
    echo "Zsh already installed."
    exit 0
fi

sudo apt install -y zsh

cd /home/vagrant

echo -e "vagrant" | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

sed -i -- "s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"agnoster\"/g" /home/vagrant/.zshrc

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions

git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search

sed -i -- "s/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-completions history-substring-search)/g" /home/vagrant/.zshrc

git clone https://github.com/agnoster/agnoster-zsh-theme.git
mv agnoster-zsh-theme/agnoster.zsh-theme ~/.oh-my-zsh/themes
rm -rf agnoster-zsh-theme

source ~/.zshrc<file_sep>/timezone.sh
#!/usr/bin/env bash

echo "Configuring timezone ..."

# Server
sudo cp /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime

# sudo unlink /etc/localtime
# sudo echo "America/Sao_Paulo" > /etc/timezone
# sudo dpkg-reconfigure -f noninteractive tzdata &> /dev/null<file_sep>/scripts/install-node.sh
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
# Check If nvm Has Been Installed
NODE_VERSION=$1;

# Install node
if [ -f /home/vagrant/.nvm ]
then
	nvm install $NODE_VERSION;
	nvm use $NODE_VERSION;
fi
<file_sep>/scripts/install-git.sh
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
# Check If Git Has Been Installed

if [ -f /home/vagrant/.gitconfig ]
then
    echo "Git already installed."
    exit 0
fi

# Add Git PPA
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update

# Install Git
sudo apt-get install -y git

# Setting user name and e-mail
git config --global user.name "<NAME>"
git config --global user.email "<EMAIL>"
<file_sep>/scripts/install-npm.sh
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
# Check If nvm Has Been Installed
NPM_VERSION=$1;

# Install node
npm install -g npm@$NPM_VERSION;<file_sep>/php_timezone.sh
#!/usr/bin/env bash

echo "Configuring timezone PHP..."

# PHP 7.1 FPM AND CLI
sudo sed -i -- "s/date.timezone = UTC/date.timezone = 'America\/Sao_Paulo'/g" /etc/php/7.1/cli/php.ini
sudo sed -i -- "s/date.timezone = UTC/date.timezone = 'America\/Sao_Paulo'/g" /etc/php/7.1/fpm/php.ini

# PHP 7.2 FPM AND CLI
sudo sed -i -- "s/date.timezone = UTC/date.timezone = 'America\/Sao_Paulo'/g" /etc/php/7.2/cli/php.ini
sudo sed -i -- "s/date.timezone = UTC/date.timezone = 'America\/Sao_Paulo'/g" /etc/php/7.2/fpm/php.ini


sudo service php5.6-fpm restart &> /dev/null
sudo service php7.0-fpm restart &> /dev/null
sudo service php7.1-fpm restart &> /dev/null
sudo service php7.2-fpm restart &> /dev/null<file_sep>/scripts/install-nvm.sh
#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
# Check If nvm Has Been Installed

if [ -f /home/vagrant/.nvm ]
then
    echo "NVM already installed."
    exit 0
fi

# Downalod nvm via curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

if [ -f /home/vagrant/.zshrc ]
then
    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | zsh
else