Skip to content

Instantly share code, notes, and snippets.

View ziarv's full-sized avatar

Zia ziarv

View GitHub Profile
jioo /
Last active September 28, 2023 19:10
How to export stash as a file, and apply it to another computer

Stash current changes

  • git > Stash > Stash (Include Untracked)

Create stash as patch

git stash show "stash@{0}" -p > changes.patch

Apply patch

codediodeio / database.rules.json
Last active September 29, 2023 14:03
Common Database Rules for Firebase
View database.rules.json
// No Security
"rules": {
".read": true,
".write": true
spalladino /
Created December 22, 2015 13:47
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