Skip to content

Instantly share code, notes, and snippets.

View albertobraschi's full-sized avatar

Alberto Braschi albertobraschi

View GitHub Profile
@albertobraschi
albertobraschi / Magento-HHVM.md
Created February 2, 2016 12:59 — forked from SchumacherFM/Magento-HHVM.md
Running Magento Enterprise Edition with Facebook HipHop HHVM

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

Hardware

MacBook Air (MBA) Mid 2012

@albertobraschi
albertobraschi / hhvm_magento_setup.md
Created February 2, 2016 13:01 — forked from tegansnyder/hhvm_magento_setup.md
HHVM Magento Server Setup

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.

Install the EPEL, Webtatic, and REMI repos

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
@albertobraschi
albertobraschi / magento-code-snippets.md
Created February 8, 2016 00:53 — forked from arosenhagen/magento-code-snippets.md
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@albertobraschi
albertobraschi / gist:2b8c4c50eebeebdbc2e3
Created February 11, 2016 13:57
dados enviados checkout
billing[address_id]:
billing[email]:email@gmail.com
billing[firstname]:Alberto
billing[lastname]:Braschi
billing[tipo_pessoa]:F
billing[rg]:000000000
billing[insc_est]:
billing[taxvat]:00000000
billing[razao_social]:
billing[nome_fantasia]:
{"updateSection":{"shippingMethod":null,"paymentMethod":null,"review":null,"couponDiscount":null},"duplicateBillingInfo":false,"reloadTotals":false,"error":true,"success":false,"orderCreated":false,"redirectUrl":null,"errorMessage":{"message":"Por favor, verifique as informa\u00e7\u00f5es do endere\u00e7o de cobran\u00e7a.","errorFields":[{"inputId":"billing:firstname","message":"Please enter the first name."},{"inputId":"billing:lastname","message":"Please enter the last name."}]},"message":null}
{updateSection: {shippingMethod: null, paymentMethod: null, review: null, couponDiscount: null},…}
duplicateBillingInfo: false
error: true
errorMessage: {message: "Por favor, verifique as informações do endereço de cobrança.",…}
errorFields: [{inputId: "billing:firstname", message: "Please enter the first name."},…]
0: {inputId: "billing:firstname", message: "Please enter the first name."}
1: {inputId: "billing:lastname", message: "Please enter the last name."}
message: "Por favor, verifique as informações do ender
@albertobraschi
albertobraschi / AleloConnector.java
Created February 16, 2016 12:44 — forked from vrcca/AleloConnector.java
Como consultar o saldo disponível da Alelo.
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 {

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
AF 0132 AFEGANISTÃO
AL 0175 ALBÂNIA, REPÚBLICA DA
DE 0230 ALEMANHA
BF 0310 BURKINA FASO
AD 0370 ANDORRA
AO 0400 ANGOLA
AI 0418 ANGUILLA
AG 0434 ANTIGUA E BARBUDA
0477 ANTILHAS HOLANDESAS
SA 0531 ARÁBIA SAUDITA
CREATE TABLE IF NOT EXISTS `awb_country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code_country` varchar(30) NOT NULL,
`awb_code` varchar(30) NOT NULL,
`name_country` varchar(300) NOT NULL,
`created_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ;
@albertobraschi
albertobraschi / Install-Magento-1.md
Created October 13, 2016 18:40 — forked from rafaelstz/Install-Magento-1.md
Install Magento 1.9.2.4 (With Sample Data)