Skip to content

Instantly share code, notes, and snippets.

View philwinkle's full-sized avatar

Phillip Jackson philwinkle

  • West Palm Beach, FL
View GitHub Profile
ytp923p92gjp923galkjew;klajsd;lgjasl;dgjjzij;lkj;lkjl;;¬…¬˚¬˚∆˚∆∆¬∆…øˆp;.lojmu•ºª•¨ª¨¨øˆø¨øjjklła ?:>l,./;;l,kmjn mk,bvhn098765tr4890p8iu7t5r4ety67890-=0p9sgw32g23g /'/
@philwinkle
philwinkle / compare-core-mods.sh
Last active December 12, 2015 05:49
MD5 Comparison snapshot of current Magento release files. Works and tested on OSX, CentOS; though OSX requires md5 instead of md5sum
#!/bin/bash
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'} > 1.11.2.0.local.md5
diff 1.11.2.0.base.md5 1.11.2.0.local.md5
@philwinkle
philwinkle / Data.php
Created April 14, 2013 00:32
Mage_Autoquote
<?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
<?php
/**
* Magento version/edition helper for determining the Magento BASE version (regardless of edition) and adds functions to check if Enterprise, Professional or Community are being run.
* Adds isMageCommunity(), isMageProfessional() and isMageEnterprise()
*
* @category TBT
* @package TBT_Rewards
* @author WDCA Sweet Tooth Team <[email protected]>
*/
class TBT_Rewards_Helper_Version extends Mage_Core_Helper_Abstract {
<action type="dataflow/convert_parser_csv" method="parse">
<var name="delimiter"><![CDATA[,]]></var>
<var name="enclose"><![CDATA[]]></var>
<var name="fieldnames"></var>
<var name="map">
<map name="sku"><![CDATA[sku]]></map>
<map name="image"><![CDATA[image]]></map>
<map name="image_label"><![CDATA[image_label]]></map>
<map name="small_image"><![CDATA[small_image]]></map>
<map name="small_image_label"><![CDATA[small_image_label]]></map>
#!/usr/bin/env php
<?php
//
// PHP REPL with initialized Magento environment
//
// Thanks to https://github.com/d11wtq/boris
//
// Drop this script in your $PATH and run it anywhere in a Magento directory tree to start the REPL
//
@philwinkle
philwinkle / Mysql4.diff
Last active December 19, 2015 12:28
MySQL 5.6 Innodb defaults patch
diff --git a/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php b/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
index bc482b5..ce55834 100644
--- a/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
+++ b/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php
@@ -60,6 +60,10 @@ class Mage_Install_Model_Installer_Db_Mysql4 extends Mage_Install_Model_Installer_Db_Abstract
{
$variables = $this->_getConnection()
->fetchPairs('SHOW VARIABLES');
+ if (substr($variables['version'], 0, 3) == '5.6') {
+ return true;
@philwinkle
philwinkle / waste.php
Last active October 6, 2021 21:00
Waste fixed amount of memory in PHP
<?php
/**
* Yeah yeah yeah, as if we need this, right?
* @author Phillip Jackson <[email protected]>
* @twitter philwinkle
*/
function waste($size){
$initSize = memory_get_usage();
@philwinkle
philwinkle / addPingdomProbesToDebugList.php
Last active December 19, 2015 18:39
Update using Zend_Feed_Rss
<?php
require_once 'app/Mage.php';
Mage::app();
$xml = new Zend_Feed_Rss('https://my.pingdom.com/probes/feed');
$debugIps = Mage::getStoreConfig('dev/restrict/allow_ips');
if($debugIps) {
@philwinkle
philwinkle / day.css
Last active March 25, 2021 03:24
Day and Night CSS files for Chris Harry jQuery lesson testing in jsFiddle. For more context see http://jsfiddle.net/87Nzy/1/
body {
background-color: yellow;
color: #000;
}