Skip to content

Instantly share code, notes, and snippets.

View andreasoby's full-sized avatar

Andreas Øby Kjeldsen andreasoby

View GitHub Profile
@andreasoby
andreasoby / mysql-docker.sh
Created December 19, 2019 12:59 — 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
geoip2.city(
function(location) {
console.log(location.country);
},
function(error) {
console.log("Error:\n\n" + JSON.stringify(error, undefined, 4) );
}
);
@andreasoby
andreasoby / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console