Skip to content

Instantly share code, notes, and snippets.

View GabrielApG's full-sized avatar

Gabriel Gonçalves GabrielApG

View GitHub Profile
@GabrielApG
GabrielApG / Config Proxy Git and Npm
Last active January 18, 2018 17:24 — forked from beradrian/setproxy
Set proxy for npm and git
# set a proxy
set HTTP_PROXY=
set HTTPS_PROXY=%HTTP_PROXY%
npm config set proxy %HTTP_PROXY%
npm config set https.proxy %HTTPS_PROXY%
git config --global http.proxy %HTTP_PROXY%
git config --global https.proxy %HTTPS_PROXY%
# unset proxy
npm config delete proxy
@GabrielApG
GabrielApG / composer-proxy.md
Created January 18, 2018 12:23 — forked from ozh/composer-proxy.md
Using Composer behind a proxy

Define the proxy in the CLI :

$ export https_proxy='87.248.188.202:8080'
$ export http_proxy='87.248.188.202:8080'

Check proxy :

@GabrielApG
GabrielApG / Controller.php
Created October 24, 2017 17:10 — forked from milon/Controller.php
Delete Modal Popup with Laravel, Bootstrap and jQuery
public function index(){
$categoryList = Category::all();
return view('category.list')->with('categoryList', $categoryList);
}
@GabrielApG
GabrielApG / Laravel PHP7 LEMP DigitalOcean.md
Created September 23, 2017 21:54 — forked from naveenyagati/Laravel PHP7 LEMP DigitalOcean.md
Configuration for Installing Laravel with LEMP on Ubuntu 16.04 on Digital Ocean

Steps to install latest Laravel with LEMP on Digital Ocean Ubuntu 16.4

This tutorial is made based upon my experiences.In DigitalOcean Firewall in Configured by default so no changes are needed.Let's Encrypt has been pre-installed for us in Digita Ocean, please see: http://do.co/le-nginx

Install PHP 7 on Ubuntu

sudo apt-get update
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 install zip unzip
sudo apt-get install -y php7.0 php7.0-fpm php7.0-mysql php7.0-zip php7.0-gd
@GabrielApG
GabrielApG / VS Code.md
Created September 4, 2017 12:40 — forked from paulofreitas/VS Code.md
My Visual Studio Code setup
@GabrielApG
GabrielApG / Material.xml
Last active March 27, 2018 19:37
Material Theme ConEmu
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2017-07-10 16:22:52" build="170517">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Bash::Git bash}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@GabrielApG
GabrielApG / .htaccess
Created June 29, 2017 18:59 — forked from eliasfaical/.htaccess
.htaccess
# Otimização no carregamento das paginas
# BEGIN Gzip Compression
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
# END Gzip Compression
# BEGIN Disable ETags
# Header unset ETag
@GabrielApG
GabrielApG / .htaccess
Created June 29, 2017 18:59 — forked from alexankit/.htaccess
.htaccess
# Cache these type of files for 7 days
<IfModule mod_headers.c>
<FilesMatch "\.(jpg|jpeg|png|ico|gif|css|js|eot|otf|tt[cf]|woff|woff2|svg|mp4|webm|ogv)$">
Header set Cache-Control "max-age=604800, must-revalidate"
Header unset ETag
FileETag None
</FilesMatch>
# Cache html files for 1 hour
<FilesMatch "\.(html|htm)$">
@GabrielApG
GabrielApG / .htaccess
Created June 29, 2017 18:59 — forked from boogah/.htaccess
Expire headers .htaccess code.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
@GabrielApG
GabrielApG / .bash_aliases
Created May 24, 2017 12:35 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset