I hereby claim:
- I am gh0st026 on github.
- I am gh0st026 (https://keybase.io/gh0st026) on keybase.
- I have a public key ASB-XLJdmlIT8fy8pqJ5yDCeMPU92XPEB20fDQTyeRvaewo
To claim this, I am signing this object:
sudo docker stop $(sudo docker ps -aq) | |
sudo docker rm $(sudo docker ps -aq) | |
sudo docker network prune -f | |
sudo docker rmi -f $(sudo docker images --filter dangling=true -qa) | |
sudo docker volume rm $(sudo docker volume ls --filter dangling=true -q) | |
sudo docker rmi -f $(sudo docker images -qa) |
# Download File | |
scp -i ec2key.pem username@ec2ip:/path/to/file . | |
# Upload File | |
scp -i ec2key.pem path/to/file username@ec2ip:/path/to/file |
# View iptables rules | |
sudo iptables -S | |
# Export iptables Rules | |
sudo iptables-save > iptables-export | |
# Import iptables rules | |
sudo iptables-restore < iptables-export | |
# Persist rules on reboot on ubuntu |
CONTAINER_NAME=Container | |
DUMP_FILE=dump.sql | |
sudo docker exec -u postgres ${CONTAINER_NAME} pg_dumpall -c > ${DUMP_FILE} |
CONTAINER_NAME=Container | |
DUMP_FILE=dump.sql | |
cat ${DUMP_FILE} | sudo docker exec -i ${CONTAINER_NAME} psql -U postgres |
CONTAINER_NAME=Container | |
sudo docker exec -it ${CONTAINER_NAME} /bin/bash |
sudo docker ps |
CONTAINER="name" | |
DB="Db name" | |
TABLE="Table Name" | |
FILE="file.csv" | |
sudo docker exec -u postgres ${CONTAINER} psql -d ${DB} -c "COPY ${TABLE} TO STDOUT WITH CSV HEADER " > ${FILE} |
# change setup_11.x to the desired version. IE: setup_8.x for v8 | |
curl --silent --location https://rpm.nodesource.com/setup_11.x | sudo bash - | |
sudo yum -y install nodejs | |
node --version |
I hereby claim:
To claim this, I am signing this object: