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 | 
| class CreateImports < ActiveRecord::Migration | |
| def self.up | |
| create_table :imports do |t| | |
| t.string :datatype | |
| t.integer :processed, :default => 0 | |
| t.string :csv_file_name | |
| t.string :csv_content_type | |
| t.integer :csv_file_size | |
| t.timestamps | |
| end | 
| -- | |
| -- Magento CE database clean-up extended | |
| -- | |
| -- This is an extended clean-up which will clean search, import/export, reports, etc. | |
| -- | |
| -- @author Constantin Bejenaru <[email protected]> | |
| -- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/) | |
| -- @license http://www.opensource.org/licenses/mit-license.html MIT License | |
| -- | 
| <?php | |
| add_filter( 'woocommerce_enqueue_styles', 'my_woocommerce_styles' ); | |
| function my_woocommerce_styles($styles){ | |
| unset($styles['woocommerce-layout']); | |
| unset($styles['woocommerce-smallscreen']); | |
| $styles['woocommerce-layout'] = array( | |
| 'src' => get_stylesheet_directory_uri() . '/woocommerce-layout.css', | |
| 'deps' => '', | |
| 'version' => '1.0.0', | |
| 'media' => 'all' | 
| #! /bin/bash | |
| ## PHP 7 Initial Compile ## | |
| ## Some help from the various places like these. ## | |
| # http://www.zimuel.it/install-php-7/ | |
| # http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu | |
| ## Setup Ubuntu 15.04/15.10 ## | |
| # Other dependencies for PHP 7. Add any missing ones from configure script | |
| # complaints, plus some LAMP needs too. | 
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm| package springangularjs; | |
| import java.io.IOException; | |
| import org.jsoup.Connection; | |
| import org.jsoup.Jsoup; | |
| import org.jsoup.nodes.Document; | |
| import org.jsoup.select.Elements; | |
| public class AleloConnector { |