Skip to content

Instantly share code, notes, and snippets.

View deivisonarthur's full-sized avatar

Deivison Arthur Lemos Serpa deivisonarthur

View GitHub Profile
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
@deivisonarthur
deivisonarthur / 0_reuse_code.js
Created May 15, 2014 06:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

Hardware

MacBook Air (MBA) Mid 2012

<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary on
ModPagespeedXHeaderValue "Powered By mod_pagespeed"
ModPagespeedEnableFilters add_instrumentation
ModPagespeedEnableFilters extend_cache
ModPagespeedForceCaching on
ModPagespeedDisallow *timthumb.php*
ModPagespeedDomain http://thecustomizewindows.com
ModPagespeedDomain http://*.google.com
# Get all the pre-reqs installed:
sudo apt-get install git-core cmake g++ libboost-dev libmysqlclient-dev \
libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev \
libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev \
autoconf libtool libcurl4-openssl-dev libboost-system-dev \
libboost-program-options-dev libboost-filesystem-dev wget memcached \
libreadline-dev libncurses-dev libmemcached-dev libbz2-dev \
libc-client2007e-dev php5-mcrypt php5-imagick libgoogle-perftools-dev \
libelf-dev libdwarf-dev subversion \

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary on
ModPagespeedXHeaderValue "Powered By mod_pagespeed"
ModPagespeedEnableFilters add_instrumentation
ModPagespeedEnableFilters extend_cache
ModPagespeedForceCaching on
ModPagespeedDisallow *timthumb.php*
ModPagespeedDomain http://thecustomizewindows.com
ModPagespeedDomain http://*.google.com
var YY = 2012;
var MM = 12;
var DD = 3;
var HH = 14;
var MI = 5;
var SS = 0;
function atualizaContador() {
var hoje = new Date();
var futuro = new Date(YY,MM-1,DD,HH,MI,SS);