Cheat Sheets
Fundamentals
Git
Dev developing procedure checkout a new branch called "feature_branch" make modifications commit...
Mutex
What is it mutual exclusion a synchronization primitive used in concurrent programming to ensure...
Regex
// Character class [xyz] => matches one of [x,y,z] [a-c] => matches one of [a,b,c] // Negated ch...
DSA
Trees
Types of trees Binary Tree Binary Search Tree left child < node < right value AVL Tree se...
Definitions
Bloom Filter Searching for a key in a cache system might take a long time in a LSM tree because ...
Strings
ZList: def buildZList(s: str) -> List[int]: """ Used in pattern matching: buildZList(need...
Database
DB Design Tips
Don't use business related field as primary key business related fields examples: individual tax...
Database Indexes
B-Tree Index Pros: fast read, fast range query no limit on number of keys Cons: slow writes ...
Database Replications
Sync vs Async replication sync ensures strong consistency, but slower writes async ensures faste...
Elastic Search Cheatsheet
What is it? a convenience wrapper around Lucene to allow for fast searching in a distributed sys...
GORM CheatSheet
Import import ( "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/gorm" ) func mai...
PostgreSQL CheatSheet
PostgreSQL is: open sourced supports both relational and non-relational (JSON) queries for dynam...
Redis Cheatsheet
Key Points in-memory, key-value store supports string, int, hash(map<string, string>), list, set...
MongoDB Cheatsheet
Feature easy to use, well documented similar to SQL B-Tree ACID Transactions Single Leader R...
Cassandra Cheatsheet
ref: Jordan Key characteristics WideColumnStore Eventual Consistency Tunable ACID LSM Tree Index...
Database Comparisons
SQL Databases relational normalized data (minimum duplicate data) Uses B Tree or B+ Tree inde...
System Design
Message Queues / Stream Processing
Fundamentals
Push Type Message Queue optimized for latency messages are pushed out as soon as they arrive ...
Apache Flink
Stream Processing Frameworks Key Use Cases: Real-time analytics: Fraud detection, anomaly detec...
Kafka Cheatsheet
Kafka Fail Reason 1: Lack of Expertise and Resources scaling and implementing Kafka solutions re...
Configuration Notes
DevOps
Markdown CheatSheet
Basic Syntax These are the elements outlined in John Gruber’s original design document. All Markd...
OpenAPI V3.0 Syntax CheatSheet
OpenApi 3.0 specification in Yaml format contents can be written in separate files, and reference...
Proto3 CheatSheet
Why Protocol Buffers? Protocol buffers are Google's language-independent, platform-independent, ...
Golang CheatSheet
Zero Values integer: 0 float: 0.0 boolean: false strings: "" channel, map, slice, pointer, f...
Javascript Advanced
The + Operator converting the given expression to a number +(new Date()) // 1593565210654 +tru...
Finances
Nginx Cheatsheet
Configuration files /etc/nginx/nginx.conf /etc/nginx/sites-available/* /etc/nginx/sites-ena...
Message Broker / Stream Processing Cheatsheet
Stream Processing a broker between producers and consumers broker deals with TCP/UDP connection...
Flutter Cheatsheet
Print dependencies tree flutter pub deps -s tree How to get virtual device storage on host machi...
AWS Cheatsheet
Get current logged in user $ aws sts get-caller-identity { "UserId": "AIDA3C6FL2I6WTCTDQ5V7",...
P2P CheatSheet
What is P2P? It's a general term to describe two machine can communicate directly with each other...