Skip to content

Instantly share code, notes, and snippets.

View florinel-chis's full-sized avatar

Florinel Chis florinel-chis

  • Magendoo
  • Bucharest, Romania
View GitHub Profile
@florinel-chis
florinel-chis / gist:5078251
Created March 3, 2013 20:55
Mage_Catalog_Block_Navigation - improved cache key
//Mage_Catalog_Block_Navigation::
public function getCacheKeyInfo(){
$shortCacheId = array(
'CATALOG_NAVIGATION',
Mage::app()->getStore()->getId(),
Mage::getDesign()->getPackageName(),
Mage::getDesign()->getTheme('template'),
// Mage::getSingleton('customer/session')->getCustomerGroupId(),
'template' => $this->getTemplate(),
'name' => $this->getNameInLayout(),
@florinel-chis
florinel-chis / siege-mgd1
Created March 1, 2013 23:41
Siege on a Magento Demo store with sample data - homepage and category page (no Varnish, no FPC)
#Homepage: /
** SIEGE 2.70
** Preparing 100 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 3542 hits
Availability: 100.00 %
Elapsed time: 59.98 secs
Data transferred: 17.63 MB
@florinel-chis
florinel-chis / prestashop_post_install.sh
Created November 27, 2012 19:09
Prestashop post install
rm -rf install
mv admin admin123
@florinel-chis
florinel-chis / prestashop_install_permissions.sh
Created November 27, 2012 19:05
Prestashop Install - File Permissions
chmod -R 777 config/
chmod -R 777 cache/
chmod -R 777 log/
chmod -R 777 img/
chmod -R 777 mails/
chmod -R 777 modules/
chmod -R 777 themes/
chmod -R 777 translations/
chmod -R 777 upload/
chmod -R 777 download/
@florinel-chis
florinel-chis / komodo_php_beautifier
Created October 23, 2012 16:59
Macro for Komodo Edit - PHP Beautifier
try {
if (komodo.view.scintilla) { komodo.view.scintilla.focus(); }
var currentPos = komodo.editor.currentPos;
var ke = komodo.editor;
var file = komodo.interpolate('%F');
var php = komodo.interpolate('%(php)');
var script = "/usr/local/zend/bin/php_beautifier"//this can be changed to the path of php_beautifier, install using PEAR
var cmd = script+" --filters='ArrayNested()' "+file; // add options dialog?
StatusBar_AddMessage("Beautifying "+file,"editor",5000,true);