Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am gastonnina on github.
* I am gastonnina (https://keybase.io/gastonnina) on keybase.
* I have a public key ASApuYI9RGq-y86qWcHOe0Yody9qf4-8juDLSNpoV848xgo
To claim this, I am signing this object:
@gastonnina
gastonnina / post-merge
Created August 28, 2017 20:47
post-merge CI database
#!/bin/bash
# @author Gaston Nina
# Copy this to ".git/hooks" inside your current repo
# Permite buscar solo los que estan dentro de la carpeta sql y son nuevos, Estos son rodenandos a-z mejor si se pone notacion 20170801_01_algo.sql
files="$(git diff-tree -r --name-only --diff-filter=A HEAD^ HEAD | grep '^sql/' | sort -n)"
# dir_base="${PWD}/../../"
dir_base="${PWD}/"
# echo "dir_base-->$dir_base"
@gastonnina
gastonnina / gist:61df955fc18cbcce2c01
Created October 30, 2014 15:10
check ubuntu version
# check ubuntu version
lsb_release -a
@gastonnina
gastonnina / LogF.php
Last active December 30, 2015 22:08
Simple log file with fopen and fwrite PHP
<?php
abstract class LogF{
static $namefile;
static $fp;
public static function setFileName($nameFile='logf'){
self::$namefile= $nameFile;
$file_log=self::$namefile.'_'.date('Ymd').'.txt';
self::$fp= fopen($file_log, "a+");
}
@gastonnina
gastonnina / .bashrc
Created July 19, 2013 21:40
Necesitas adicionar el siguiente alias a .bashrc que se encuentra en tu carpeta /home para ejecutarlo con "gupdate nombrepoyecto" El script creara una carpera dentro de /git/ con el nombre del proyecto y fecha acual de la publicacion como un listado de archivois adicionados Practico para actualizar a servidor de producción.
#git
alias gupdate='sh /home/gaston/rutine/git.sh $1'
@gastonnina
gastonnina / gist:5654565
Created May 27, 2013 00:33
Actualiza Alias en Ubuntu sin reiniciar
$> printenv
$> source /home/usuario/.bashrc
@gastonnina
gastonnina / notes git
Created April 19, 2013 01:10
git var -l
les dejo un #tip sobre #git para ver datos de usuario "git var -l"