Skip to content

Instantly share code, notes, and snippets.

View EdwinBetanc0urt's full-sized avatar
💼
Working

Edwin Betancourt EdwinBetanc0urt

💼
Working
View GitHub Profile
@EdwinBetanc0urt
EdwinBetanc0urt / git-pre-commit.pl
Created February 11, 2019 03:13
Git pre-commit hook to check PHP & JS syntax.
#!/usr/bin/env perl
# Copy me to the .git/hooks directory and rename file to "pre-commit"
#
# This script is invoked by "git commit" and runs some PHP and JS syntax checks
# on the files staged for commit. It exits with a non-zero status if any check
# fails.
use strict;
use warnings;
@EdwinBetanc0urt
EdwinBetanc0urt / DecimalFormat.js
Created January 7, 2019 15:59 — forked from oskansavli/DecimalFormat.js
Javascript number formatter (Java DecimalFormat Implemented in Javascript)
/**
* @class DecimalFormat
* @constructor
* @param {String} formatStr
* @author Oskan Savli
*/
function DecimalFormat(formatStr)
{
/**
* @fieldOf DecimalFormat
@EdwinBetanc0urt
EdwinBetanc0urt / diashabiles.php
Last active March 5, 2018 11:50 — forked from angelmartz/diashabiles.php
Obtener días hábiles en PHP
<?php
/**
* Metodo getDiasHabiles
*
* Permite devolver un arreglo con los dias habiles
* entre el rango de fechas dado excluyendo los
* dias feriados dados (Si existen)
*
* @param string $fechainicio Fecha de inicio en formato Y-m-d
* @param string $fechafin Fecha de fin en formato Y-m-d