mysqldump -u bw_magento -p --default-character-set=utf8 bw_magento > bw_magento-local-28.05.2018.sql
View ffmpeg convert mkv to mp3
find . -type f -name "*.mkv" -exec sh -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -c:a libmp3lame -y "${FILE%.mkv}.mp3";' _ '{}' \; |
View docker-with-volume
docker run -it --name <name> -v $(pwd):/home alpine sh |
View magento-cache-clean
composer require --dev mage2tv/magento-cache-clean | |
Cache Watch | |
vendor/bin/cache-clean.js --watch | |
Cache Clean Single | |
vendor/bin/cache-clean.js config full_page | |
Cache Help | |
vendor/bin/cache-clean.js --help |
View docker-debian.txt
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash | |
sudo apt-get install git-lfs | |
git lfs install |
View MySQL Query Logging
# log MySQl Queries | |
# in file /etc/mysql/my.cnf | |
general_log = 1 | |
log_output = table | |
-- Get Insert Statements | |
SELECT argument FROM general_log WHERE command_type = 'Query' AND argument LIKE '%UPDATE%' OR argument LIKE '%INSERT%'; |
View Useful Git Commnds
// Save Git Password for one year | |
git config --global credential.helper 'cache --timeout=31536000'; | |
// Ignore chmod | |
git config core.fileMode false; | |
// Set Username Global | |
git config --global user.name "Your Name" | |
// Set User Email |
View gist:75bc1846c67773bfc36bb7a5013e6c57
php -dmemory_limit=6144M -dsafe_mode=Off /usr/local/Cellar/n98-magerun/1.98.0/libexec/n98-magerun-1.98.0.phar index:reindex:all |
View gist:03912ab06be27dd90a5f83259665b0e6
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition . | |
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \; | |
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \; | |
chmod u+x bin/magento; | |
bin/magento setup:install \ | |
--db-host=database \ | |
--db-name=magento2 \ | |
--db-user=app \ | |
--db-password=app \ |
View gist:ca07c13448e2472e40119a74ae1a662a
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
NewerOlder