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
| require('app/Mage.php'); | |
| umask(0); | |
| Mage::setIsDeveloperMode(true); | |
| Mage::app(); | |
| Mage::app()->loadArea('frontend'); | |
| $layout = Mage::getSingleton('core/layout'); | |
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
| # with gunzip | |
| gunzip < magento_db.2015-02-18.sql.gz | mysql -u root -p -h 127.0.0.1 -P 13306 magento_db | |
| # or with pv & gzcat - for pipe buffer size display | |
| pv magento_db.2015-02-18.sql.gz | gzcat | mysql -u root -p -h 127.0.0.1 -P 13306 magento_db | |
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
| http://stackoverflow.com/questions/10335747/how-to-download-xcode-4-5-6-7-and-get-the-dmg-file/10335943#10335943 |
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 | |
| find public/media -type f \ | |
| ! -name ".DS_Store" \ | |
| ! -name ".htaccess" \ | |
| ! -path "public/media/catalog/*cache*" \ | |
| ! -path "public/media/css*" \ | |
| ! -path "public/media/js*" \ | |
| ! -path "public/media/import/*" \ | |
| ! -path "public/media/wysiwyg/.thumbs/*" \ |
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
| UPDATE domains_table | |
| SET domain = REPLACE(domain, "https://OLD-DOMAIN.IO", "https://NEW-DOMAIN.IO") | |
| WHERE domain LIKE "https://OLD-DOMAIN.IO%"; |
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
| function formatBytes($size, $precision = 2) | |
| { | |
| $base = log($size, 1024); | |
| $suffixes = array('', 'k', 'M', 'G', 'T'); | |
| $floor = floor($base); | |
| return round(pow(1024, $base - $floor), $precision) . $suffixes[$floor]; | |
| } | |
| echo "Hopeful Memory Usage: " . formatBytes(memory_get_peak_usage()) . PHP_EOL; |
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
| https://docs.google.com/spreadsheets/d/1MTbU9Bq130zrrsJwLIB9d8qnGfYZnkm4jBlfNaBF19M/edit?pli=1#gid=0 | |
| https://twitter.com/benmarks/status/619153980699099136 | |
| Nice one https://twitter.com/knowj !!! |
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
| UPDATE `core_resource` | |
| SET `version`='0.0.9', `data_version`='0.0.9' | |
| WHERE `code` LIKE '%setup_resource_name%'; |
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
| # DELETE Customer Quotes - Older than 60 days | |
| DELETE FROM `sales_flat_quote` | |
| WHERE (NOT ISNULL(customer_id) AND customer_id != 0) | |
| AND updated_at < DATE_SUB(Now(), INTERVAL 60 DAY) | |
| LIMIT 10000; | |
| # DELETE - Anonymous Customer Quotes - Older than 60 Days | |
| DELETE FROM `sales_flat_quote` | |
| WHERE (ISNULL(customer_id) OR customer_id = 0) | |
| AND updated_at < DATE_SUB(Now(), INTERVAL 60 DAY) |
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 TABLE_NAME, ENGINE | |
| FROM information_schema.TABLES | |
| WHERE TABLE_SCHEMA = 'DATABASE_NAME'; |
NewerOlder