Skip to content

Instantly share code, notes, and snippets.

View admin-grid-status.js
// Drop this javascript in the page where your grid is - maybe using a .phtml
// in before_body_end or whatever.
$$(".admin-autoemail-adminhtml-rule-index td:contains('Inactive')").each(function(status) {
$(status).up().select('td, a').invoke('setStyle',{ color: '#aaa' });
philwinkle /
Last active Aug 29, 2015 identity

Keybase proof

I hereby claim:

  • I am philwinkle on github.
  • I am philwinkle ( on keybase.
  • I have a public key whose fingerprint is 60A1 B554 D364 2133 72FA E6E2 2820 5D5D 3273 2182

To claim this, I am signing this object:


Debugging (Resource) Model Instantiation

Follow each step manually and any bugs during (resource) model instantiation will become obvious.

Since many people find model and resource model instantiation to be one of the more challenging things in Magento 1, these are all the steps Magento does to resolve the factory name to the real PHP class name.

To debug, simply follow each step manually until you find a non-match. This works really well in my experience.
Less guessing, more and faster results.

In the examples I use a factory name of "example/thing".

View Observer.php
class Sample_Model_Observer
protected $colToAdd = 'colname';
* @param Varien_Event_Observer $observer
public function urapidflow_profile_action( $observer )
$action = $observer->getData( 'action' );
$profile = $observer->getData( 'profile' );
philwinkle / gist:fd3d153b27f7b6da9992
Created Aug 26, 2014
PHP 5.4 Dereferencing with an array for a helper
View gist:fd3d153b27f7b6da9992
$__ = array(Mage::helper('yourcompany/helper'), '__');
echo $__('Translate me');
philwinkle / SassMeister-input-HTML.html
Created Aug 27, 2014
Generated by
View SassMeister-input-HTML.html
<a href="#" class="button">Obnoxious button</a>
philwinkle / election-results.txt
Created Sep 1, 2015
2015 Moderator Election Results
View election-results.txt
OpenSTV version 1.7 (
Suggested donation for using OpenSTV for an election is $50. Please go to to donate via PayPal, Google Checkout, or
Amazon Payments.
Certified election reports are also available. Please go to for more information.
Loading ballots from file magento-stackexchange-com-2015-election-results.blt.
View keyboard-cleaned.txt
ytp923p92gjp923galkjew;klajsd;lgjasl;dgjjzij;lkj;lkjl;;¬…¬˚¬˚∆˚∆∆¬∆…øˆp;.lojmu•ºª•¨ª¨¨øˆø¨øjjklła ?:>l,./;;l,kmjn mk,bvhn098765tr4890p8iu7t5r4ety67890-=0p9sgw32g23g /'/
philwinkle /
Last active Dec 12, 2015
MD5 Comparison snapshot of current Magento release files. Works and tested on OSX, CentOS; though OSX requires md5 instead of md5sum
find app/code/core/Mage app/code/core/Enterprise app/code/core/Zend lib/Varien lib/Mage lib/Zend -type f | grep -v '\.svn' | sort -d -f -k1 | xargs md5sum | awk {'print $2, $1'} >