Skip to content

Instantly share code, notes, and snippets.

View maxsimych's full-sized avatar

Max maxsimych

View GitHub Profile
@maxsimych
maxsimych / postgres-cheatsheet.md
Last active November 10, 2019 06:10 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Connecting:

psql -U postgres

or

psql user_name(postgres) -h 127.0.0.1 -d db_name
@maxsimych
maxsimych / weeklies.md
Created July 21, 2019 13:36 — forked from cayasso/weeklies.md
List of Weeklies
@maxsimych
maxsimych / docker get ip
Last active July 19, 2019 08:42 — forked from nerdalert/gistify691462.sh
Get an ip of docker container
### Example #1 ###
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2e23d01384ac iperf-v1:latest "/usr/bin/iperf -s" 10 minutes ago Up 10 minutes 5001/tcp, 0.0.0.0:32768->5201/tcp compassionate_goodall
# Append the container ID (CID) to the end of an inspect
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' 2e23d01384ac
172.17.0.1
### Example #2 ###
# Add -q to automatically parse and return the last CID created.
@maxsimych
maxsimych / README.md
Created March 11, 2019 11:24 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet