You can use tiny script m2dump it is doing the same thing as described below.
Estimate size of directories and exclude no needed.
du -sh ./* | sort -h
SELECT version_id - (SELECT version_id FROM enterprise_mview_metadata WHERE changelog_name = 'enterprise_url_rewrite_redirect_cl') FROM enterprise_url_rewrite_redirect_cl ORDER BY version_id DESC LIMIT 1; | |
SELECT version_id - (SELECT version_id FROM enterprise_mview_metadata WHERE changelog_name = 'cataloginventory_stock_status_cl') FROM cataloginventory_stock_status_cl ORDER BY version_id DESC LIMIT 1; | |
SELECT version_id - (SELECT version_id FROM enterprise_mview_metadata WHERE changelog_name = 'enterprise_url_rewrite_category_cl') FROM enterprise_url_rewrite_category_cl ORDER BY version_id DESC LIMIT 1; | |
SELECT version_id - (SELECT version_id FROM enterprise_mview_metadata WHERE changelog_name = 'enterprise_url_rewrite_product_cl') FROM enterprise_url_rewrite_product_cl ORDER BY version_id DESC LIMIT 1; | |
SELECT version_id - (SELECT version_id FROM enterprise_mview_metadata WHERE changelog_name = 'catalog_category_product_index_cl') FROM catalog_category_product_index_cl ORDER BY version_id DESC LIMIT 1; | |
SELECT |
#Magento Aliases | |
alias m1.clear.cache='echo "rm -rf var/*cache*"; rm -rf var/*cache*' | |
alias m1.show.version='cat app/Mage.php | grep -A 10 "function getVersionInfo"' | |
alias m1.mysql.debug.enable='\ | |
sed -i "" "s/_debug[ ]*= false/_debug = true/g" lib/Varien/Db/Adapter/Pdo/Mysql.php; \ | |
sed -i "" "s/_logAllQueries[ ]*= false;/_logAllQueries = true;/g" lib/Varien/Db/Adapter/Pdo/Mysql.php; \ | |
sed -i "" "s/_logCallStack[ ]*= false;/_logCallStack = true;/g" lib/Varien/Db/Adapter/Pdo/Mysql.php'; | |
alias m1.mysql.debug.disable='\ | |
sed -i "" "s/_debug[ ]*= true/_debug = false/g" lib/Varien/Db/Adapter/Pdo/Mysql.php; \ | |
sed -i "" "s/_logAllQueries[ ]*= true;/_logAllQueries = false;/g" lib/Varien/Db/Adapter/Pdo/Mysql.php; \ |
[mysqld] | |
## After edit config you have to remove log files and restart mysql server | |
## because after changing innodb-log-file-size you should recreate ib_logfiles | |
## Stop MySQL server | |
## rm /data/dir/ib_logfile* | |
## Run MySQL server | |
##Table open cache under MacOS and MySQL 5.6 should be 250. | |
##Otherwise you will get error MySQL server has gone away | |
##table-open-cache = 250 |
function m2sniff() | |
{ | |
phpcs --standard=EcgM2,PSR1,PSR2 $1; | |
vendor/bin/phpmd $1 text cleancode, codesize, controversial, design, naming, unusedcode | |
} |
#!/usr/bin/php | |
<?php | |
$mageFilename = 'app/Mage.php'; | |
require_once $mageFilename; | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_errors', 1); | |
umask(0); | |
Mage::app('admin'); | |
Mage::register('isSecureArea', 1); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
#Travis CI | |
export COMPOSER_AUTH='{"http-basic":{"repo.magento.com": {"username": "public-key", "password": "secret-key"}}}' |
curl -X POST "http://<BASE_URL>/index.php/rest/V1/integration/admin/token" \ | |
-H "Content-Type:application/json" \ | |
-d '{"username":"admin", "password":"123123q"}' | |
curl -X POST "http://<BASE_URL>/index.php/rest/V1/configurable-products/<PARENT_SKU>/child" \ | |
-H "Content-Type:application/json" \ | |
-H "Authorization: Bearer <TOKEN>" \ | |
-d '{"childSku": "BlackSimpleProduct"}' | |
curl -X DELETE "http://<BASE_URL>/index.php/rest/V1/configurable-products/<PARENT_SKU>/children/<CHILD_SKU>" \ |
#!/bin/bash | |
function runCommand() | |
{ | |
echo $CMD; | |
eval $CMD; | |
} | |
N98=$(which n98-magerun2.phar); | |
command -v $N98 >/dev/null 2>&1 || { | |
echo "I require $N98 tool but it is not installed" >&2; |
You can use tiny script m2dump it is doing the same thing as described below.
Estimate size of directories and exclude no needed.
du -sh ./* | sort -h
#!/usr/bin/env bash | |
function runCommand | |
{ | |
echo "${CMD}" | |
eval ${CMD}; | |
} | |
function getDb | |
{ | |
echo $(grep [\']db[\'] -A 20 app/etc/env.php | grep $1 | head -n1 | sed "s/.*[=][>][ ]*[']//" | sed "s/['][,]//"); | |
return 0; |