- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
DHT Walkthrough Notes
I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.
What problem does this solve?
400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros.
The number of atoms in the universe is estimated to be around
A DHT with keys of 160 bits, can have
2^160 possible numbers, which is around
|Step by step how to pull a private DockerHub hosted image in a Kubernetes YML.|
|export DOCKER_USER=Type your dockerhub username, same as when you `docker login`|
|export DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login`|
|export DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login`|
|kubectl create secret docker-registry myregistrykey \|
|# docker build -t ubuntu1604py36|
|RUN apt-get update|
|RUN apt-get install -y software-properties-common vim|
|RUN add-apt-repository ppa:jonathonf/python-3.6|
|RUN apt-get update|
|RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv|
|RUN apt-get install -y git|
|-- show running queries (pre 9.2)|
|SELECT procpid, age(query_start, clock_timestamp()), usename, current_query|
|WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'|
|ORDER BY query_start desc;|
|-- show running queries (9.2)|
|SELECT pid, age(query_start, clock_timestamp()), usename, query|
|WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'|