Skip to content

Instantly share code, notes, and snippets.

View cdvillagra's full-sized avatar

Christopher Villagra cdvillagra

View GitHub Profile
@cdvillagra
cdvillagra / cardCheck.js
Created September 3, 2016 06:38
Validação de cartão de crédito com referência à tabela IIN e validação com algoritimo de Luhn mod 10
//# Cria objeto primario caso não exista
if(typeof lavamosnos == 'undefined') lavamosnos = new Object();
//# Cria objeto secundário relacionado à classe quando não existir
if(typeof lavamosnos.card == 'undefined') lavamosnos.card = new Object();
var operators = [{
flag : 'visa',
maxNumber : [
13,16
@cdvillagra
cdvillagra / pointOnPolygon.php
Last active June 10, 2016 17:07
Method checks if a point is contained in the polygon
<?php
/*
|--------------------------------------------------------------------------------
| Point on Polygon - DVILLAGRA
|--------------------------------------------------------------------------------
|
| # Method checks if a point is contained in the polygon
|
| @author Christopher Villagra - <[email protected]>