mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
mysqldump -u [uname] -p[pass] [dbname] | gzip -9 > [backupfile.sql.gz]
// enable template hints in admin | |
INSERT INTO core_config_data (scope, scope_id, path, value) | |
VALUES ('default', 0, 'dev/debug/template_hints', 1), | |
('default', 0, 'dev/debug/template_hints_blocks', 1); |
http://www.magestore.com/blog/2012/09/07/magento-certificate-total-models/
Get Ready for Magento Certified Developer Exam. Magento Codepool http://blog.belvg.com/magento-certification-magento-codepool.html
Get Ready for Magento Certified Developer Exam. Magento Module Structure. http://blog.belvg.com/magento-certification-module-structure.html
Get Ready for Magento Certified Developer Exam. The Main Magento Design Areas and More…
<?php | |
// $foo = Mage::getModel('..... | |
// $bar = Mage::getModel('..... | |
$transaction = Mage::getModel('core/resource_transaction'); | |
$transaction->addObject($foo); | |
$transaction->addObject($bar); | |
$transaction->save(); // runs save on all objects. On error -> rollback |
SET @entityid = '3'; | |
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type' | |
FROM catalog_category_entity e | |
JOIN catalog_category_entity_varchar eav | |
ON e.entity_id = eav.entity_id | |
JOIN eav_attribute ea | |
ON eav.attribute_id = ea.attribute_id | |
WHERE e.entity_id = @entityid | |
UNION |
# | |
# Customized VCL file for serving up a Drupal site with multiple back-ends. | |
# | |
# For more information on this VCL, visit the Lullabot article: | |
# http://www.lullabot.com/articles/varnish-multiple-web-servers-drupal | |
# | |
# Define the internal network subnet. | |
# These are used below to allow internal access to certain files while not | |
# allowing access from the public internet. |
# Use one of the download links here: http://phantomjs.org/download.html | |
# In this case, it's the 32-bit version. | |
sudo yum install freetype fontconfig | |
cd ~ | |
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 | |
bunzip2 phantomjs*.tar.bz2 | |
tar xvf phantomjs*.tar | |
sudo cp phantomjs*/bin/phantomjs /usr/bin/phantomjs | |
phantomjs -v |