Skip to content

Instantly share code, notes, and snippets.

View acbilimoria's full-sized avatar

Alex C. Bilimoria acbilimoria

View GitHub Profile
@acbilimoria
acbilimoria / README.md
Created November 9, 2020 22:46
Kubernetes Upgrade Steps (EKS)
@acbilimoria
acbilimoria / development-build.sh
Created May 5, 2017 21:17
Get New Laravel Install Ready to use
#make sure composer is installed globally
composer global require "laravel/installer"
#make sure that composer is installed
composer install --no-dev --optimize-autoloader
#update composer to make sure dependencies are up to date
composer update --no-scripts
#copy .env.example file as .env
@acbilimoria
acbilimoria / production-build.sh
Created May 5, 2017 20:34
Laravel 5.4 Ubuntu 16.04 Production Build
# generate key
php artisan key:generate
# disable debugging
sed -i "s/'debug' => env('APP_DEBUG', true),/'debug' => env('APP_DEBUG', false),/g" config/app.php
# allow Laravel to write to storeage
sudo chmod -R 775 /var/www/SITE-NAME/public/storage
composer install --no-dev --optimize-autoloader
@acbilimoria
acbilimoria / post-receive
Created May 5, 2017 16:52
One Touch Build & Deploy - Laravel 5.4 on LEMP Stack Ubuntu 16.04
#!/usr/bin/env ruby
# 1. Read STDIN (Format: "from_commit to_commit branch_name")
from, to, branch = ARGF.read.split " "
# 2. Only deploy if master branch was pushed
if (branch =~ /master$/) == nil
puts "Received branch #{branch}, not deploying."
exit
end
@acbilimoria
acbilimoria / info.txt
Last active May 4, 2017 18:25
VHost Ubuntu 16.04 LAMP
sudo vim /etc/hosts
# add this line:
127.0.0.1 EXAMPLE.loc
# create new conf file based off of the default
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/EXAMPLE.loc.conf
# edit the apache2.conf file
# add this block of text below the other Directory tags
<Directory /home/mac/code/ztrust/ztrust/>
@acbilimoria
acbilimoria / bash.sh
Last active May 1, 2017 17:17
WordPress on Ubuntu 16: Add LetsEncrypt
# Install the Let's Encrypt Client
sudo apt-get update
sudo apt-get install python-letsencrypt-apache
# Set up the SSL Certificate for ServerName and ServerAlias
# select force SSL if desired
# add email
# accept terms and conditions
# select appropriate .conf file if applicable
sudo letsencrypt --apache -d example.com -d www.example.com
@acbilimoria
acbilimoria / gist:af512b7929c658900918ba3ed0e63141
Last active May 5, 2017 19:40
Install Composer & Laravel 5.4 on Ubuntu 16.04
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo npm install -g npm
sudo npm install -g n
sudo npm install gulp -g
sudo n stable
npm rebuild node-sass
npm install
composer update --no-scripts
@acbilimoria
acbilimoria / npm-install-string
Last active April 26, 2017 22:49
NPM install string
sudo npm install gulp gulp-concat gulp-autoprefixer gulp-clean-css gulp-uglify gulp-rename gulp-watch gulp-cssmin gulp-insert gulp-sass laravel-elixir laravel-elixir-vue laravel-elixir-vue webpack node-sass laravel-elixir-webpack-official --global
sudo apt-get update
sudo apt-get install apache2 mysql-server php pep8 libapache2-mod-php php-mcrypt php-mysql php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc silversearcher-ag xclip htop python3 xvfb python3-pip libxml2 chromium-chromedriver firefox postgresql postgresql-contrib python-psycopg2 libpq-dev npm letsencrypt dos2unix vsftpd mailutils gconf2 gconf-service gconf-service-backend gconf2-common libgconf-2-4 sendmail python3-tk unzip git vim nodejs-legacy flake8 mtpfs libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9 ruby ruby-dev libxml2-dev libxslt1-dev python-dev liblzma-dev zlib1g-dev qt5-default android-tools-adb udev mtp-tools kdeconnect postgresql postgresql-contrib php-cli ubuntu-make php-dev gcc make autoconf libc-dev pkg-config kcachegrind sqlite graphicsmagick pvm-dev phantomjs rake libicu-dev imagemagick libmysqlclient-dev composer -y
sudo vim /etc/apache2/apache2.conf
# add ServerName server_domain_or_IP
sudo ufw allow in "Apa
Install PHP 5.6:
sudo yum -y update
sudo yum -y install epel-release
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget https://centos7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm
sudo yum -y update
sudo yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
sudo service httpd restart