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 | |
//get all products | |
$products = Mage::getResourceModel('catalog/product_collection')->getAllIds(); | |
//Now create an array of attribute_code => values | |
$attributesData = array( | |
array('orig' => 1), | |
array('ncm' => 33030020), | |
array('ucom' => 'un'), | |
array('subst' => 1) |
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
git config --global color.ui auto | |
git config --global color.branch auto | |
git config --global color.diff auto | |
git config --global color.interactive auto | |
git config --global color.status auto |
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
UPDATE eav_entity_store | |
SET increment_last_id = '100180000' | |
WHERE | |
entity_store_id = 1 |
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 Namespace_Module_Model_Customfield extends Mage_Core_Model_Abstract { | |
protected function _construct() { | |
$this->_init('namespace/customfield'); | |
} | |
public function toOptionArray() { | |
$options = array( | |
0 => array('value' => 'SP', 'label' => 'São Paulo'), | |
1 => array('value' => 'MG', 'label' => 'Minas Gerais'), |
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
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES | |
('BR', 'AC', 'Acre'); | |
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES | |
('en_US', LAST_INSERT_ID(), 'Acre'), ('pt_BR', LAST_INSERT_ID(), 'Acre'); | |
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`) VALUES | |
('BR', 'AL', 'Alagoas'); | |
INSERT INTO `directory_country_region_name` (`locale`, `region_id`, `name`) VALUES | |
('en_US', LAST_INSERT_ID(), 'Alagoas'), ('pt_BR', LAST_INSERT_ID(), 'Alagoas'); |
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
git diff --name-only 859f95bc 94a94459 | tar -czvpf patch_20130207.tar.gz -T - |
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
#!/bin/sh | |
yum -y install httpd php | |
/sbin/chkconfig httpd on | |
/etc/init.d/httpd start |
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
SELECT | |
table_schema "Nome DB", | |
SUM( data_length + index_length) / 1024 / 1024 "Tamanho em MB" | |
FROM | |
information_schema.TABLES | |
GROUP BY | |
table_schema; |
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
git config core.fileMode false |
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
git config --global color.ui auto | |
git config --global color.branch auto | |
git config --global color.diff auto | |
git config --global color.interactive auto | |
git config --global color.status auto |
OlderNewer