Skip to content

Instantly share code, notes, and snippets.

Avatar

Santiago García santigarcor

View GitHub Profile
@santigarcor
santigarcor / gist:3593c385cc123ccc4db262ac764de9d4
Created Oct 30, 2017
Phpunit colors for vscode output console using vscode-log-output-colorizer
View gist:3593c385cc123ccc4db262ac764de9d4
<dict>
<!-- Phpunit Failure -->
<key>match</key>
<string>(FAILURES|ERRORS)!</string>
<key>name</key>
<string>markup.error</string>
</dict>
<dict>
<!-- Phpunit Failure numbers -->
<key>match</key>
View Add gzip to ubuntu 16.04.md

In the /etc/nginx/nginx.conf

##
# `gzip` Settings
#
#
gzip on;
gzip_disable "msie6";
@santigarcor
santigarcor / add-ssh-key.sh
Last active Oct 12, 2017
Add ssh key to server
View add-ssh-key.sh
#!/bin/bash
if [[ $(whoami) == "root" ]]; then
echo "Please don't run this script as sudo user"
exit 1
fi
username=$(whoami)
while [[ -z "$sshPublicKey" ]]
@santigarcor
santigarcor / new-site.sh
Last active Oct 12, 2017
Add a new site
View new-site.sh
#!/bin/bash
if [[ $(whoami) == "root" ]]; then
echo "Please don't run this script as sudo user"
exit 1
fi
inputWithDefault() {
read -r userInput
userInput=${userInput:-$1}
@santigarcor
santigarcor / server-setup.sh
Last active Jun 23, 2019
Server provisioning interactive script
View server-setup.sh
#!/bin/bash
export DEBIAN_FRONTEND="noninteractive"
if [[ $(whoami) != "root" ]]; then
echo "Please run this script as root user"
exit 1
fi
inputWithDefault() {
read -r userInput
View Virtual Blocks on Nginx.md

Inspired and edited from this Digital Ocean tutorial.

Follow the steps on this gist to setup a LEMP stack with PHP 7.0.

The steps assume Nginx has been configured correctly.

Setup the root directories

For the domains example.com and test.com, create the folders.

@santigarcor
santigarcor / gup-to-webpack.md
Created Feb 2, 2017 — forked from rap2hpoutre/gup-to-webpack.md
Laravel 5.4: migrate from gulp to webpack
View gup-to-webpack.md
  • Create a webpack.mix.js file in root directory:
const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
  .sass('resources/assets/sass/app.scss', 'public/css');
  
/* Optional: uncomment for bootstrap fonts */
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/','public/fonts/bootstrap');
@santigarcor
santigarcor / Laravel PHP7 LEMP AWS.md
Last active Jun 15, 2018 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x
View Laravel PHP7 LEMP AWS.md

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
You can’t perform that action at this time.