Skip to content

Instantly share code, notes, and snippets.

View mmRoshani's full-sized avatar
🦉
software & data engineer

Mohammad Mojtaba Roshani - mmRoshani (TOMaaR) mmRoshani

🦉
software & data engineer
View GitHub Profile
@mmRoshani
mmRoshani / psql.md
Last active April 20, 2023 16:56
PostgreSQL useful commands

psql installation

$ yay -S psqlodbc

Restore *.sql

> psql -U postgres -h localhost -d dev -f ./<sql-name>.sql
@mmRoshani
mmRoshani / postgresql-docker-compose.yaml
Last active April 20, 2023 15:38
PostgreSQL docker compose
version: '3.3'
volumes:
psql:
services:
postgres:
container_name: dbms_sql_pg
image: postgres:14.1-alpine
@mmRoshani
mmRoshani / postgres_backup_bash_script.sh
Last active August 18, 2022 16:30
postgres database hand tool backup with bash script (pg_dump package is required)
#/user/bin/sh
systemUser=$(whoami)
date=$(date +'%m-%d-%Y')
echo "postgress database hand tool runed by ${systemUser} at ${date}."
path="./db/backup"
echo "Enter Database Host (localhost):"
@mmRoshani
mmRoshani / mongo.md
Last active July 29, 2022 17:25
MongoDB help full knowledge

MongoDB help full knowledge

Before read

  • Don't pay attention to mongoDB configuration, all of them are default and i didn't change them.
  • I intentionally put some ! in the json result to be a hint for you.
  • Ask any question here or contact me via linkedin for conversation.

Indexes