Find large files in ubuntu

sudo find /your/path -xdev -type f -size +1000M or use the graphical analyser "filelight"sudo find /your/path -xdev -type f -size +1000M or use the graphical analyser "filelight"

Yarn 2 upgrade all packages

You have to install the interactive-tools plugin first. $ yarn plugin import interactive-tools $ yarn upgrade-interactive$ yarn plugin import interactive-tools $ yarn upgrade-interactive Press / to select packages. Press to install. Press / to select versions. Press to abort. Other Option: If U Want To Use The Old Command (yarn outdated) install this plugin $ … Read more

NPM save as dev dependency

Install as devDependency npm install <package-name> –save-devnpm install <package-name> –save-dev Install as normal dependency npm install <package-name> –savenpm install <package-name> –save Install all devDependencies listed in package.json npm install –only=devnpm install –only=dev Install all normal dependencies listed in package.json npm install –only=prodnpm install –only=prod Or if NODE_ENV is set to production npm installnpm install

Magento shell reindex

php -f shell/indexer.php reindexall   php shell/indexer.php –reindex catalog_product_attribute php shell/indexer.php –reindex catalog_product_price php shell/indexer.php –reindex catalog_url php shell/indexer.php –reindex catalog_product_flat php shell/indexer.php –reindex catalog_category_flat php shell/indexer.php –reindex catalog_category_product php shell/indexer.php –reindex catalogsearch_fulltext php shell/indexer.php –reindex cataloginventory_stock php shell/indexer.php –reindex tag_summaryphp -f shell/indexer.php reindexall php shell/indexer.php –reindex catalog_product_attribute php shell/indexer.php –reindex catalog_product_price php shell/indexer.php –reindex … Read more

Backup postgres database docker

docker exec -i pg_container_name psql –username pg_username [–password pg_password] database_name < /path/on/your/machine/dump.sqldocker exec -i pg_container_name psql –username pg_username [–password pg_password] database_name < /path/on/your/machine/dump.sql

Undo git rebase

Option 1: git reset –hard ORIG_HEADgit reset –hard ORIG_HEAD Option 2: git refloggit reflog

Shell for loop

for i in {1..10} do echo "Hello $i times" donefor i in {1..10} do echo "Hello $i times" done