This file contains 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 -it --rm --net=host -v $PWD/static:/data mnuessler/schemaspy -hq -t mysql \ | |
-host YOUR-DB.COM \ | |
-u USER \ | |
-p 'PASSWORD' \ | |
-db DB_NAME \ | |
-o /data/FOLDER_NAME |
This file contains 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 stop mysql1 || true | |
docker run --rm --volumes-from mysql1 -v $(BACK_DIR):/backup ubuntu tar cvf /backup/sql_volume.tar /var/lib/mysql | |
docker start mysql1 | |
restore: | |
docker stop mysql1 | |
docker run --rm --volumes-from mysql1 -v $(BACK_DIR):/backup ubuntu bash -c "rm -rf /var/lib/mysql/* && cd / && tar xvf /backup/sql_volume.tar" | |
docker start mysql1 | |
load: | |
docker exec -i mysql1 mysql -uroot $(DATABASE_NAME) < mysqldump |
This file contains 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
# Copyright (c) 2016-2021 Ming Qin (覃明) <https://github.com/QinMing> | |
# Open source under MIT LICENSE. | |
export PATH=/usr/local/bin:$PATH | |
export ZSH="$HOME/.oh-my-zsh" | |
DISABLE_MAGIC_FUNCTIONS=true | |
# So that it doesn't add the extra excape character. Without this line, pasting `mingq.in/?param` will become `mingq.in/\?param` | |
ZSH_THEME="agnoster" |
This file contains 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
#!/usr/bin/env python3 | |
# | |
# Sample Usage: | |
# <command> '.*\.html' | |
import logging | |
import os | |
import re | |
from argparse import ArgumentParser |
OlderNewer