Skip to content

Instantly share code, notes, and snippets.

View JonMadVal's full-sized avatar

Jonathan Madrid Valencia JonMadVal

  • Medellin-Colombia
View GitHub Profile
@JonMadVal
JonMadVal / post-receive
Created April 16, 2018 22:21 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@JonMadVal
JonMadVal / post-receive
Created April 16, 2018 22:21 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
<?php
use JWTAuth as Auth;
if (! function_exists('qString')) {
/**
* Obtener query string con el mismo nombre.
*
* @param string $key
*/
@JonMadVal
JonMadVal / helpers.php
Created January 12, 2018 01:51
My personal "Laravel Helper" file.
<?php
// Constantes de ayuda
const __punto__ = '.';
const __coma__ = ',';
const __guion__ = '-';
const __espacio__ = ' ';
if (!function_exists('user')) {
/**