Skip to content

Instantly share code, notes, and snippets.

View nreddy12's full-sized avatar

nreddy12

  • NIT Surathkal
  • Bangalore
View GitHub Profile
@nreddy12
nreddy12 / postgres-cheatsheet.md
Created November 6, 2020 06:55
Postgres SQL commands cheatsheet

Postgres SQL

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)
@nreddy12
nreddy12 / monitoring.py
Created September 18, 2018 14:30
Monitoring Scripts | Python
#!/usr/bin/env python
@nreddy12
nreddy12 / System Design Techniques.md
Created February 7, 2018 05:20
System Design | Techniques To Scale Your System

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
  • Constraints
    • Mainly identify traffic and data handling constraints at scale.
    • Scale of the system such as requests per second, requests types, data written per second, data read per second)