Skip to content

Instantly share code, notes, and snippets.

View netusco's full-sized avatar

Ernest Conill netusco

  • New Relic
  • Barcelona
View GitHub Profile
@netusco
netusco / habtm_counter_cache.php
Created November 17, 2010 12:47 — forked from neilcrookes/habtm_counter_cache.php
fixed one infinite loop...
<?php
/**
* Provides counter cache behavior for HABTM records.
*
* Example: Posts habtm Tags and tags table contains post_count field
*
* class Post extends AppModel {
* var $name = 'Post';
* var $actsAs = array('HabtmCounterCache');
* var $hasAndBelongsToMany = array('Tag');
@netusco
netusco / Standard.php
Last active February 19, 2016 08:44 — forked from mzeis/Standard.php
Debug module / controller / action routing in Magento CE 1.9.2.3. Save file as app/code/local/Mage/Core/Controller/Varien/Router/Standard.php
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@netusco
netusco / magento_new_admin_user.sql
Last active March 31, 2016 10:59 — forked from tridungpham/new_gist_file.sql
Create new admin user in Magento with password "admin"
INSERT INTO admin_user SELECT
NULL `user_id`,
"Dung" `firstname`,
"Pham" `lastname`,
"dungpt@sutunam.com" `email`,
"dungpt.sutunam" `username`,
"9684dfd577831f73890e88fe18ca9072:Hs" `password`,
NOW() `created`,
NULL `modified`,
NULL `logdate`,