Skip to content

Instantly share code, notes, and snippets.

View minhazul-ashim's full-sized avatar
🏠
Working from home

Minhazul Ashim minhazul-ashim

🏠
Working from home
View GitHub Profile
@minhazul-ashim
minhazul-ashim / postgres-cheatsheet.md
Created June 3, 2024 22:57 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@minhazul-ashim
minhazul-ashim / clean_code.md
Created October 29, 2022 15:14 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules