This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 <contact@sweettoothhq.com> | |
*/ | |
class TBT_Rewards_Helper_Version extends Mage_Core_Helper_Abstract { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hyreasZLOAS tyuiop0;ewqe=[] | |
['phn[' | |
]'[l.:" | |
}p[;?.≤gbfcxcfghgcvvghcv xcvbjnbvcxhbnvc ΩcfvxzsedsazaswaASWA qasdesaAQWEWQA qwertuuhgfdsehk;' | |
]\\ | |
']\\ | |
]\]\]=]=p0[-==p0-o9i890-p0o9u7u7w2e34rq1 `12wq1 ` | |
? | |
'/.;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# So, you forgot to use logrotate and now you're staring at a 30GB system | |
# log on your production server. | |
# Never fear... | |
# Tail an arbitrarily large number of bytes off the end of the thing. | |
# This example takes approximately the last 5GB. | |
tail -c 5000000000 system.log > ~/system.log.tmp | |
# But, we only want the last month of log data. Let's find the line number | |
# where this month's reporting starts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Marty_Package_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
public function getYesnoHtml() | |
{ | |
$options = Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(); | |