Skip to content

Instantly share code, notes, and snippets.

View jasonevans1's full-sized avatar
:octocat:

Jason Evans jasonevans1

:octocat:
View GitHub Profile
@ticean
ticean / Category.sql
Created December 10, 2010 04:45
A series of queries for selecting Magento entity EAV attributes, and their values. Lots of union here...
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
<?php
namespace Pokus;
class Exception extends \Exception
{
}
function tttt($string)
{
try {
@schmengler
schmengler / OnepageController.php
Created January 18, 2012 12:09
Magento Checkout Integration Test
<?php
/**
* Integration test for OnePageCheckout
*
* @author Fabian Schmengler <[email protected]>
* @copyright SGH informationstechnologie UGmbH 2012
* @package SGH\Common
* @subpackage Test
*
*/
@colinmollenhour
colinmollenhour / A-repo-moved.md
Created March 28, 2012 07:17
REPO MOVED! (Cm_Cache_Backend_File)
@molotovbliss
molotovbliss / gist:2562551
Last active September 7, 2022 20:18 — forked from davidalexander/gist:1086455
Magento Snippets

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@zachbrowne
zachbrowne / cloud9.sh
Created May 9, 2012 14:47
Bash Script to Install Node.js and Cloud9 IDE on Ubuntu
#!/bin/sh
#######################################################
# Another great script by: #
# _ , _ #
# / ) _, _ |) /|/_) ,_ _ _ #
# / / | / |/\ | \/ | / \_| | |_/|/| |/ #
# /__/\/|_/\__/| |/|(_/ |/\_/ \/ \/ | |_/|_/ #
# (| #
# #
@werdan
werdan / Amazon CloudFormation Template (AutoScaling)
Created December 24, 2012 11:31
Amazon CloudFormation Template (AutoScaling)
{
"Description" : "ProjectX scalable stack of frontal nodes",
"Parameters" : {
"InstanceType" : {
"Description" : "Type of EC2 instance to launch",
"Type" : "String",
"Default" : "m1.xlarge"
},
"SSHKeyName" : {
"Description" : "The EC2 Key Pair to allow SSH access to the instances",
@mklooss
mklooss / Product.php
Last active December 11, 2015 00:29
Magento Product Cache Loading by Johann Reinke, added "isAdmin" http://www.johannreinke.com/en/2012/04/13/magento-how-to-cache-product-loading/
<?php
/**
* @see http://www.johannreinke.com/en/2012/04/13/magento-how-to-cache-product-loading/
*/
class Namespace_Catalog_Model_Product
extends Mage_Catalog_Model_Product
{
public function load($id, $field = null)
@SchumacherFM
SchumacherFM / Magento-HHVM.md
Last active May 17, 2018 18:26
Running Magento Enterprise Edition with Facebook HipHop HHVM

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

Hardware

MacBook Air (MBA) Mid 2012

@clochix
clochix / casperShell.js
Created October 8, 2013 09:37
Sample code to call a shell script from CasperJS
// (…)
var childProcess;
try {
childProcess = require("child_process");
} catch (e) {
this.log(e, "error");
}
if (childProcess) {
childProcess.execFile("/bin/bash", ["mycommand.sh", args1, args2, args3], null, function (err, stdout, stderr) {
this.log("execFileSTDOUT:", JSON.stringify(stdout), 'debug');