Tech, Art, and Things

Markdown Syntax

sequenceDiagram
    Alice-)Bob: Hello Bob, how are you ?
    Bob-)Alice: Fine, thank you. And you?
    create participant Carl
    Alice-)Carl: Hi Carl!
    create actor D as Donald
    Carl-)D: Hi!
    destroy Carl
    Alice-xCarl: We are too many
    destroy Bob
    Bob-)Alice: I agree

Rendered SVG

sequenceDiagram
    Alice-)Bob: Hello Bob, how are you ?
    Bob-)Alice: Fine, thank you. And you?
    create participant Carl
    Alice-)Carl: Hi Carl!
    create actor D as Donald
    Carl-)D: Hi!
    destroy Carl
    Alice-xCarl: We are too many
    destroy Bob
    Bob-)Alice: I agree
author-icon

Poetry with Pyenv

@jjk 12/16/2022

If you are noticing that poetry isn’t using the python version you specify via .python-version in your local directory you can fix your issue with the following command.

poetry config virtualenvs.prefer-active-python true

Backup

The following command will back up a remote database to a file name <file> on the machine you run this command on.

pg_dump -h <host> -U <username> -W <database> > <file>

Restore

The following command will restart a backup file to a database.

psql -U user -W <database> < <file>

Useful Hints

If you are trying to restore the database to a docker compose project you can use the following command.

# Assuming that db is the name of your database service
docker cp <file> "$(docker compose ps -q db)":/
docker exec -it "$(docker compose ps -q db)" /bin/bash
psql -U user -W v8 < <file>