Bin e padrões para validação de cartão de crédito.
| Bandeira | Começa com | Máximo de número | Máximo de número cvc |
|---|---|---|---|
| Visa | 4 | 13,16 | 3 |
| Mastercard | 5 | 16 | 3 |
| Object.defineProperty(Date.prototype,"diff",{ | |
| writable: false, configurable: false, enumerable: true, | |
| /** | |
| * Returns the difference between two Date objects. | |
| * @param {Date} The date to compare to. | |
| * @return {Object} | |
| * @throws {TypeError} | |
| */ | |
| value: function(date) { |
| (function ( global, undefined ) { | |
| var observer = {}, | |
| topics = {}; | |
| observer.on = function ( topic, fn ) { | |
| if ( !topics[topic] ) topics[topic] = []; | |
| topics[topic].push( fn ); | |
| return topics[topic].length - 1; | |
| }; | |
| observer.trigger = function () { | |
| var args = Array.prototype.slice.call( arguments ), |
| (function ( global, undefined ) { | |
| function slugify ( str ) { | |
| return str | |
| .toLowerCase() | |
| .replace( /á|à|â|ã/g, 'a' ) | |
| .replace( /é|è|ê/g, 'e' ) | |
| .replace( /í|ì|î/g, 'i' ) | |
| .replace( /ó|ò|ô|õ/g, 'o' ) | |
| .replace( /ú|ù|û/g, 'u' ) | |
| .replace( /ç/g , 'c' ) |
| (function ( global, undefined ) { | |
| var months = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro']; | |
| function monthName ( month, short ) { | |
| month = parseInt( month ) - 1; | |
| return short && month !== 4 ? months[month].slice( 0, 3 ) : months[month]; | |
| } | |
| global.monthName = global.monthName || monthName; | |
| } ( this )); |
| package main | |
| import ( | |
| "encoding/json" | |
| "net/http" | |
| "github.com/graphql-go/graphql" | |
| "github.com/graphql-go/handler" | |
| "github.com/graphql-go/relay/examples/starwars" | |
| ) |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm