Skip to content

Instantly share code, notes, and snippets.

@SvS30
SvS30 / mysql-docker.sh
Last active December 4, 2021 17:26
commands to backup or restore a mysql instance in a docker container
# I use the '$' symbol to indicate that they are variables, change those values.
# Backup
docker exec $name-container mysqldump -u $user --password=$pwd $database > $file-name.sql
# Restore
cat $file-name.sql | docker exec -i $name-container mysql -u $user --password=$pwd $database
# if you don't want to type your password by terminal, or are concerned about mysql warnings.
@SvS30
SvS30 / ssh_config
Last active December 7, 2021 00:14
settings for GitHub and GitLab SSH keys.
Host github.com
User your-username
Hostname github.com
PreferredAuthentications publickey
IdentityFile /path/where/the/private-key/is/saved
Host gitlab.com
User your-username
Hostname gitlab.com
PreferredAuthentications publickey