Skip to content

Instantly share code, notes, and snippets.

View shyamjos's full-sized avatar
:octocat:
&> /dev/null

Shyam Jos shyamjos

:octocat:
&> /dev/null
View GitHub Profile
@shyamjos
shyamjos / mysql-docker.sh
Created April 11, 2017 08:07 — 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
@shyamjos
shyamjos / iptables_rules.sh
Created December 5, 2016 03:08 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP