Skip to content

Instantly share code, notes, and snippets.

Stay'n cold in Minnesota

Tegan Snyder tegansnyder

Stay'n cold in Minnesota
View GitHub Profile
View Table.php
* Optimized version of attribute source options model
* That allows to preload options once and reuse them instead of doing calls to db all the time
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table
extends Mage_Eav_Model_Entity_Attribute_Source_Table
tegansnyder / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View cleanCache.php
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and
* then use this script to apply updates and refresh the config cache without
* causing a stampede on the config cache.
* @author Colin Mollenhour
View Magento_CE_1.7.0.2_v1-CSRF_Patch.diff
Date: Fri, 5 Jul 2013 22:41:03 -0500
Subject: [PATCH] Magento_CE_1.7.0.2_v1-CSRF_Patch
.../core/Mage/Catalog/Block/Product/Abstract.php | 85 ++++-
app/code/core/Mage/Catalog/Block/Product/View.php | 10 +-
.../core/Mage/Catalog/Helper/Product/Compare.php | 28 +-
app/code/core/Mage/Checkout/Helper/Cart.php | 26 +-
.../Mage/Checkout/controllers/CartController.php | 69 ++--
.../Checkout/controllers/OnepageController.php | 70 +++-
View vhost.conf
location ~ ^/_intellij_phpunit_launcher.php$ {
expires off; ## Do not cache dynamic content
set $args "$args&dir=$document_root&config=phpunit.xml.dist";
fastcgi_pass unix://var/run/php5-fpm.sock; # Replace with your fpm pass
fastcgi_read_timeout 600;
include fastcgi_params; ## See /etc/nginx/fastcgi_params

Running Magento Enterprise Edition with Facebook HipHop HHVM



MacBook Air (MBA) Mid 2012

View gist:8300864
rsync -chavzP --exclude='path/to/installation/var/cache' --exclude='path/to/installation/.git' --exclude='path/to/installation/media/catalog/product/cache' --exclude='path/to/installation/var/tmp' --exclude='path/to/installation/var/session' --exclude='kiboots/var/report' --stats username@host:path/to/installation /destination/path

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
View disable-magento-logs.xml
<?xml version="1.0"?>
<!--disable logs-->