Skip to content

Instantly share code, notes, and snippets.

@thanhlq
thanhlq / mysql-docker.sh
Created January 3, 2018 07: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
@thanhlq
thanhlq / ThinkLight
Created July 5, 2016 14:44 — forked from vzaliva/ThinkLight
This script controll keyboard backlight on IBM ThinkPad X-series
#!/bin/bash
# Vadim Zaliva lord@crocodile.org
# based on https://gist.github.com/hadess/6847281
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@thanhlq
thanhlq / README.md
Created May 4, 2016 10:53 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation