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 |
require 'ice_cube' | |
require 'active_support/all' | |
include IceCube | |
class Resource | |
attr_accessor :availability | |
def available_since(t = nil) |
<?php | |
// Script written by Vladislav "FractalizeR" Rastrusny | |
// http://www.fractalizer.ru | |
//MySQL connection settings | |
$db_server = 'localhost'; | |
$db_user="root"; | |
$db_password=""; | |
mysql_connect($db_server, $db_user, $db_password) or die(mysql_error()); |
module SingleRecipientSmtp | |
def self.included(clazz) | |
clazz.class_eval do | |
cattr_accessor :single_recipient_smtp_settings | |
end | |
end | |
def perform_delivery_single_recipient_smtp(mail) | |
mail.to = single_recipient_smtp_settings[:to] | |
mail.cc = nil |
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french ); | |
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING | |
FOR hword, hword_part, word WITH unaccent, french_stem; | |
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english ); | |
ALTER TEXT SEARCH CONFIGURATION en ALTER MAPPING | |
FOR hword, hword_part, word WITH unaccent, english_stem; | |
CREATE TEXT SEARCH CONFIGURATION de ( COPY = german ); | |
ALTER TEXT SEARCH CONFIGURATION de ALTER MAPPING |
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.githubusercontent.com/esdras/5d1f13fa37073ce23f3f/raw/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
module Main where | |
import Signal | |
type alias Message = | |
{ operation : String | |
, message : String | |
} |
defmodule Config do | |
@moduledoc """ | |
This module handles fetching values from the config with some additional niceties | |
""" | |
@doc """ | |
Fetches a value from the config, or from the environment if {:system, "VAR"} | |
is provided. | |
An optional default value can be provided if desired. |
# app deps | |
sudo yum update -y | |
# utf8 all the things | |
echo ' | |
export LC_ALL="en_US.UTF-8" | |
export LANG="en_US.UTF-8" | |
export LANGUAGE="en_US.UTF-8" | |
' >> ~/.bashrc |