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
| EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 prefix:* |
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
| mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "drop table $table" DATABASE_NAME; done | |
| # http://stackoverflow.com/a/8912749/1200542 |
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
| #!/bin/bash | |
| recup_dir="${1%/}" | |
| echo "$recup_dir"; | |
| [ -d "$recup_dir" ] || { | |
| echo "Usage: $0 recup_dir"; | |
| echo "Mirror files from recup_dir into recup_dir.by_ext, organized by extension"; | |
| exit 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
| export PHP_IDE_CONFIG="serverName=local.project.com" | |
| export XDEBUG_CONFIG="remote_host=192.168.56.1 idekey=PHPSTORM" | |
| alias phpx='php -d "xdebug.profiler_enable=1" -d "xdebug.remote_host=192.168.56.1"' | |
| # then run phpx -f filename.php |
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
| rsync -rltpDhv -e "ssh -p 2201" /path/to/local/media/ [email protected]:/home/aallon/uat/media/ |
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
| svn status | grep "^\?" | awk '{print $2}' | xargs svn add; | |
| svn status | grep "^\!" | awk '{print $2}' | xargs svn rm; |
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
| CREATE DATABASE dbname; | |
| CREATE USER 'dbuser'@'%' IDENTIFIED BY 'password'; | |
| GRANT ALL PRIVILEGES ON dbname.* TO 'dbuser'@'%'; | |
| FLUSH PRIVILEGES; |
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
| <?php | |
| $installer = Mage::getResourceModel('catalog/setup', 'catalog_setup'); | |
| if (!$installer->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'attribute_name')) { | |
| $installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'attribute_name', array( // TABLE.COLUMN: DESCRIPTION: | |
| 'label' => 'Label', // eav_attribute.frontend_label admin input label | |
| 'group' => 'General', // (not a column) tab in product edit screen | |
| 'sort_order' => 0 // eav_entity_attribute.sort_order sort order in group | |
| 'backend' => 'module/class_name', // eav_attribute.backend_model backend class |
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
| art->addProduct($product, $buyRequest); | |
| if (!$product->isVisibleInSiteVisibility()) { | |
| $cart->getQuote()->getItemByProduct($product)->setStoreId($storeId); | |
| } |
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 Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |