mysql> SHOW BINARY LOGS;
mysql> PURGE BINARY LOGS BEFORE '2021-01-01 00:00:00';
| "extra": { | |
| "enable-patching": true, | |
| "patches": { | |
| "drupal/core": { | |
| "Comments are not filtered on language": "https://www.drupal.org/files/issues/2020-07-02/comments-comments_are_not_filtered_on_language-2751267-33.patch", | |
| } | |
| } | |
| } |
| "extra": { | |
| "enable-patching": true, | |
| "patches": { | |
| "drupal/core": { | |
| "{patch-1 description}": "{patch-1 file path or URI}", | |
| "{patch-2 description}": "{patch-2 file path or URI}", | |
| } | |
| } | |
| } |
| composer require cweagans/composer-patches |
| # | |
| # Reference | |
| # https://www.baeldung.com/linux/find-convert-files-with-crlf | |
| # | |
| grep -rIl -m 1 $'\r' | xargs -P0 -I {} dos2unix {} |
| Options All -Indexes | |
| RedirectMatch ^/$ /site/ |
| # Protect dumps and shell scripts | |
| <Files ~ "\.sql$"> | |
| Deny from all | |
| </Files> | |
| <Files ~ "\.sql.gz$"> | |
| Deny from all | |
| </Files> | |
| <Files ~ "\.sh$"> |
| # | |
| # Source | |
| # https://typeofnan.dev/how-to-stop-all-docker-containers/ | |
| # | |
| # Stop | |
| docker stop $(docker ps -q) | |
| # Kill | |
| docker kill $(docker ps -q) |
| # Without cache | |
| drush sql-dump --structure-tables-list=cache,cache_* > dumpfile.sql | |
| # Without cache, search index and watchdog | |
| drush sql-dump --structure-tables-list=cache,cache_*,search_index,watchdog > dumpfile.sql | |
| # Without table spaces | |
| drush sql-dump --structure-tables-list=cache,cache_*,search_index,watchdog --extra-dump="--no-tablespaces --column-statistics=0 --set-gtid-purged=OFF" > db.sql |
| # First read | |
| # https://webdevstudios.com/2020/05/26/retroactively-sign-git-commits/ | |
| # | |
| # 1. Change into the working branch the commits were made | |
| # 2. Rebase and go back `~xx` commits. For example last two | |
| git rebase -i HEAD~2 | |
| # 3. Replace "pick" with "rework" in the next prompt and save. | |
| # 4. Push | |
| git push --force-with-lease |