Skip to content

Instantly share code, notes, and snippets.

View MioYvo's full-sized avatar
😶‍🌫️
Boring Life

Mio Lau MioYvo

😶‍🌫️
Boring Life
View GitHub Profile
@MioYvo
MioYvo / sample.py
Created September 6, 2019 16:08 — forked from zbyte64/sample.py
Docker py put archive example
import tarfile
import time
from io import BytesIO
admin_password = 'xxxxx'
#write password to file
pw_tarstream = BytesIO()
pw_tar = tarfile.TarFile(fileobj=pw_tarstream, mode='w')
file_data = admin_password.encode('utf8')
@MioYvo
MioYvo / mysql-docker.sh
Created August 28, 2019 17:12 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# 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
@MioYvo
MioYvo / kmskeys10.txt
Created March 2, 2018 19:57 — forked from CHEF-KOCH/kmskeys10.txt
Windows 10 KMS Keys
Windows.10.and.Office.2016.gVLK
#####################################################################
# Install/Uninstall keys #
#####################################################################
1.) Uninstall the current product by entering the “uninstall product key” extension:
slmgr.vbs /upk
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10”