git fsck --unreachable | grep commit | cut -d" " -f3 | xargs git log --merges --no-walk --grep=<commit message>
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
docker run --user root --rm --volume=<local-path>:/var/www/html modestcoders/php:7.4-fpm /bin/bash -c "composer self-update --2 && composer install" |
These set of scripts are for Magento 2. For Magento 1, see this Gist.
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 AS `Table`, ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` FROM information_schema.TABLES WHERE TABLE_SCHEMA = "<database-schema>" ORDER BY (DATA_LENGTH + INDEX_LENGTH) DESC; |
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
Path: vendor/magento/module-ui/view/base/web/templates/collection.html | |
<each args="data: elems, as: 'element'"> | |
<pre data-bind="text: element.getTemplate()"></pre> | |
<pre data-bind="text: ko.toJSON(element.index, null, 2)"></pre> | |
<render if="hasTemplate()"/> | |
</each> |
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 customer_entity SET email = CONCAT(SUBSTRING(MD5(UUID()), 1, 15) , '@example.com') where entity_id > 0; | |
UPDATE sales_order SET customer_email = CONCAT(SUBSTRING(MD5(UUID()), 1, 15) , '@example.com') where entity_id > 0; |
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
kill -9 `ps -ef | grep 'pattern' | awk '{print $2}'` |
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
### Download module | |
https://github.com/arut/nginx-dav-ext-module | |
### Configure Install | |
./configure --prefix=/usr/share/nginx \ | |
--sbin-path=/usr/sbin/nginx \ | |
--modules-path=/usr/lib/nginx/modules \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ |
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
## Show real-time | |
watch -n1 'mysql -u root -ppassword --execute="SHOW FULL PROCESSLIST"' | |
## Show real-time and pipe all info to file | |
watch -t -n1 '(mysql -h dbhost -u dbuser dbname -ppassword --execute="SHOW FULL PROCESSLIST") | tee -a mysql-process-list.log' | |
## Show slow queries real-time and pipe all info to file | |
watch -t -n1 '(mysql -h dbhost -u dbuser dbname -ppassword --execute="SELECT * FROM information_schema.processlist WHERE TIME > 5 ORDER BY TIME DESC") | tee -a /tmp/mysql-process-list.log' |
NewerOlder