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 | |
$conn = mysql_connect('server', 'username', 'password'); | |
mysql_select_db('database', $conn); | |
$sql = "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine <> 'InnoDB'"; | |
$rs = mysql_query($sql); | |
while ($row = mysql_fetch_array($rs)) { | |
$tbl = $row[0]; | |
$sql = "ALTER TABLE $tbl ENGINE=INNODB"; |
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
function printESCP() { | |
if (notReady()) { return; } | |
qz.append('\x1B' + '\x40'); // init | |
qz.append('\x1B' + '\x61' + '\x31'); // center align | |
qz.append('Hello world!' + '\x0A'); | |
qz.append('\x0A'); // line break | |
qz.append('\x1B' + '\x61' + '\x30'); // left align | |
qz.append('This is a test...' + '\x0A'); | |
qz.append('\x0A'); |
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
/** | |
* Generates a hash key for the exact request | |
* | |
* @return string | |
*/ | |
protected function _genRequestKey() { | |
$request = @(string)(array)$this->_request; | |
$hash = sprintf("%u", crc32(serialize($request))); | |
Mage::getSingleton('avatax/session')->setLastRequestKey($hash); | |
return $hash; |
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 | |
/** | |
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and | |
* then use this script to apply updates and refresh the config cache without | |
* causing a stampede on the config cache. | |
* | |
* @author Colin Mollenhour | |
*/ | |
umask(0); | |
ini_set('memory_limit','512M'); |
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
/* Responsive styles created by Valentin Niklasson */ | |
@media screen and (min-width : 954px) { | |
div.checkoutcontainer div.input-city { width: 45%!important; } | |
div.checkoutcontainer div.input-country select { width: 83%!important; } | |
div.checkoutcontainer div.input-city { width: 100%!important; } | |
div.checkoutcontainer div.input-region { width: 55.8%!important; } | |
div.checkoutcontainer div.input-address-short .input-text, | |
div.checkoutcontainer div.input-firstname .input-text, | |
div.checkoutcontainer div.input-lastname .input-text, | |
div.checkoutcontainer div.input-email .input-text, |
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
# get composer | |
curl -sS https://getcomposer.org/installer | php | |
# download required php-jwt library | |
php composer.phar require firebase/php-jwt | |
# get php-jwt and required Authentication dir | |
git clone git@github.com:firebase/php-jwt.git | |
ln -s php-jwt/Authentication Authentication |
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
function Run($cookies, $firebaseAuth, $rootScope, $state, FBURL) { | |
var authRef = new Firebase(FBURL), | |
clock = parseInt(getServerTime(authRef) / 1000), | |
expires = 0; | |
$rootScope.auth = $firebaseAuth(authRef); | |
$rootScope.logout = function() { | |
$rootScope.auth.$logout(); | |
$rootScope.checkSession(); |
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/Adminhtml/Block/System/Config/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php | |
index 09fe084..b834f11 100644 | |
--- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php | |
+++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php | |
@@ -460,7 +460,11 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge | |
} | |
} | |
} else { | |
- $optionArray = $sourceModel->toOptionArray($fieldType == 'multiselect'); | |
+ if (is_object($sourceModel)) { |
OlderNewer