This file contains hidden or 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
| Use the -f option to git tag: | |
| -f | |
| --force | |
| Replace an existing tag with the given name (instead of failing) | |
| You probably want to use -f in conjunction with -a to force-create an annotated tag instead of a non-annotated one. | |
| Example |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!-- | |
| /** | |
| * Magento | |
| * | |
| * NOTICE OF LICENSE | |
| * | |
| * This source file is subject to the Academic Free License (AFL 3.0) | |
| * that is bundled with this package in the file LICENSE_AFL.txt. | |
| * It is also available through the world-wide-web at this URL: |
This file contains hidden or 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
| $mageRunCode = 'shopAlias'; |
This file contains hidden or 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 fetch --tags | |
| git tag | |
| git tag -a v1.0.52 -m 'Commit description' | |
| git push origin v1.0.52 | |
| then on stage repository: | |
| git branch stage | |
| git pull origin stage | |
| then change composer.json (set new version for package) |
This file contains hidden or 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
| запись в базу нативным sql-ом | |
| $writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write'); | |
| $table = $resource->getTableName('catalog/product'); | |
| $currentTime = date('Y-m-d H:i:s', time()); | |
| $query = "UPDATE {$table} SET column = column + 1 WHERE updated_at = {$currentTime}"; | |
| $writeConnection->query($query); |
This file contains hidden or 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
| $zendDate = Mage::app()->getLocale()->date(); | |
| $zendDate->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); | |
| $zendDate->sub('30',Zend_Date::MINUTE_SHORT)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); |
This file contains hidden or 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
| echo ceil((7/0)*100); // Warning: Division by zero | |
| echo "\n\n"; | |
| echo "no Warning:) \n", ceil(@(7/0)*100); |
This file contains hidden or 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
| find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" |
This file contains hidden or 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
| List All Indexes | |
| curl 'localhost:9200/_cat/indices?v' | |
| Find records in index | |
| curl 'localhost:9200/idx_name_idx2/_search?pretty=true&q=*:*' | |
| sudo service elasticsearch restart |
This file contains hidden or 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 * FROM label_eav_attribute where attribute_code = 'attr_code' | |
| SELECT * FROM label_catalog_product_entity_varchar where attribute_id = 194 and entity_id = 589 |