memory dump
This is a personal collection of things I dont’t want to forget such as how I install and run things.
Docker
How I use it on my mid 2012 MBP
Installation
Note: requires virtualbox (and of course homebrew installed).
From: https://jongsma.wordpress.com/2021/11/29/docker-and-the-virtualbox-host-only-networks/
Run/Stop
postgres
From: https://stackoverflow.com/a/37704532/1845671
schemaspy
This creates a diagram of your database
commands
Description | Command |
---|---|
List containers, even stoped | docker ps -a |
List images | docker images |
List container ips | docker inspect -f '{{.Name}}-{{.NetworkSettings.IPAddress }}' $(docker ps -aq) |
postgres
psql (postgres client)
this installs the client without the database
From: https://stackoverflow.com/a/49689589/1845671
psql commands
Description | Command |
---|---|
Connect | psql -h localhost -p 5432 -U postgres |
Connect to database | psql -h localhost -p 5432 -U postgres -d demo |
Run sql script | psql -h localhost -p 5432 -U postgres -f demo-small-en-20170815.sql |
Back up database | pg_dump -h localhost -p 5432 -U postgres -W -F p the_database > new_file.sql |