Heading 6
🧱
HTML Cheat Sheet
Structure
<!DOCTYPE html>, <html>, <head>, <body>
Text
<h1>-<h6>, <p>, <strong>, <em>
Links & Media
<a href>, <img src alt>, <video>, <audio>
Lists
<ul>, <ol>, <li>
Forms
<form>, <input type=...>, <select>, <textarea>, required
Semantic
<header>, <nav>, <main>, <article>, <section>, <footer>
🎨
CSS Cheat Sheet
Selectors
.class, #id, element, :hover, :focus, :has()
Box Model
content → padding → border → margin; box-sizing: border-box
Flexbox
display: flex; justify-content; align-items; flex-direction
Grid
display: grid; grid-template-columns; grid-template-areas
Variables
--name: value; used with var(--name)
Responsive
@media (min-width: 768px) { ... }
⚡
JavaScript Cheat Sheet
Variables
let (reassignable), const (not reassignable)
Functions
function name() {}, const fn = () => {}
Arrays
.map(), .filter(), .reduce(), .find()
Conditionals
if/else if/else, ===, !==
Loops
for, while, for...of, for...in
DOM
document.querySelector(), .textContent, .addEventListener()
🚀
Advanced JavaScript Cheat Sheet
Async
Promise, .then()/.catch(), async/await, Promise.all()
Closures
Inner function retains access to outer function's variables
Destructuring
const { name, xp } = student; const [a, b] = array;
Spread
[...array], {...object}
Classes
class Name { constructor() {} method() {} }
⚛️
React Cheat Sheet
Component
function Component() { return <div>...</div>; }
State
const [value, setValue] = useState(initial);
Effects
useEffect(() => { ... }, [dependencies]);
Props
function Comp({ name, xp }) { ... }
Lists
items.map(item => <li key={item.id}>{item.name}</li>)
Context
useContext(MyContext)
🗄️
Database Design Cheat Sheet
Keys
Primary key: uniquely IDs a row. Foreign key: references another table's primary key.
Relationships
One-to-many: foreign key on the 'many' side. Many-to-many: join table.
Normalization
1NF: atomic values. 2NF/3NF: remove redundant dependencies.
Indexes
Speed up lookups on frequently filtered/sorted columns.
🐘
SQL Cheat Sheet
Basics
SELECT col FROM table WHERE condition ORDER BY col LIMIT n;
Joins
INNER JOIN, LEFT JOIN ... ON a.id = b.a_id
Aggregation
COUNT(), SUM(), AVG(), GROUP BY, HAVING
Writes
INSERT INTO table (col) VALUES (val); UPDATE table SET col=val WHERE id=1; DELETE FROM table WHERE id=1;
CTEs
WITH name AS (SELECT ...) SELECT * FROM name;
🐍
Python Cheat Sheet
Variables
x = 5, name = "Rico" (no type declaration needed)
Functions
def name(param): return value
Data structures
list [], dict {}, tuple (), set {}
Loops
for item in items:, while condition:
Errors
try: ... except Exception as e: ... finally: ...
Comprehensions
[x*2 for x in items if x > 0]
🔌
APIs Cheat Sheet
HTTP Methods
GET (read), POST (create), PUT/PATCH (update), DELETE (remove)
Status Codes
200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Server Error
Fetch
const res = await fetch(url); const data = await res.json();
REST Design
Use nouns for resources: /students, /students/:id
🔐
Authentication & Security Cheat Sheet
Auth vs Authz
Authentication = who you are. Authorization = what you can do.
Passwords
Always hash (bcrypt), never store plain text.
Tokens
JWT: self-contained signed token. Sessions: server-side stored state.
Common Attacks
SQL injection → parameterized queries. XSS → escape output. CSRF → CSRF tokens.
Cookies
HttpOnly, Secure, SameSite flags.
🤖
AI Development Cheat Sheet
Core Concepts
System prompt: sets AI behavior. Context window: max text the model considers at once.
Calling an LLM
POST request with messages array; each call needs full conversation history.
RAG
Retrieve relevant data, include it in the prompt, so AI answers grounded in your content.
Reliability
Ground responses to reduce hallucination; cache common responses to control cost.
🏗️
SaaS Architecture Cheat Sheet
MVP
Smallest version delivering real value. Cut everything non-essential.
Pricing
Flat subscription, usage-based, tiered, freemium.
Metrics
LTV (lifetime value), CAC (acquisition cost), MRR (monthly recurring revenue), churn.
Multi-Tenancy
Every tenant-scoped table needs an account_id column; every query must filter by it.
A text description of an image, used by screen readers and shown if the image fails to load.
HTML Foundations
Alt Text
An ordered list of values in JavaScript, accessed by numeric index.
JavaScript Fundamentals
Array
The process of verifying who a user is, typically through login credentials.
Authentication & Security
Authentication
Determining what an authenticated user is allowed to do.
Authentication & Security
Authorization
The layered structure of every HTML element: content, padding, border, and margin.
CSS Mastery
Box Model
Cascading Style Sheets — the language used to style and lay out HTML content.
CSS Mastery
CSS
A two-dimensional CSS layout system for arranging items in rows and columns at once.
CSS Mastery
CSS Grid
Common Table Expression — a named temporary result set defined with WITH, used to simplify complex queries.
SQL
CTE
The rate at which customers stop using or paying for a product over time.
SaaS Architecture
Churn
A function that retains access to variables from its outer scope even after that outer function has finished running.
Advanced JavaScript
Closure
A reusable, self-contained piece of UI in React, defined as a JavaScript function.
React Development
Component
Document Object Model — the browser's tree-like representation of a page's HTML that JavaScript can read and change.
JavaScript Fundamentals
DOM
A Python function that wraps another function to add behavior without changing its code.
Python
Decorator
A numerical vector representation of text that captures its meaning, used for semantic search.
AI Development
Embedding
A one-dimensional CSS layout system for arranging items in a row or column.
CSS Mastery
Flexbox
A column that references a primary key in another table, creating a relationship between them.
Database Design
Foreign Key
A reusable block of code that can take inputs and return an output.
JavaScript Fundamentals
Function
HyperText Markup Language — the standard language for structuring content on the web.
HTML Foundations
HTML
When an AI model generates plausible-sounding but factually incorrect information.
AI Development
Hallucination
A function that takes another function as an argument or returns one.
Advanced JavaScript
Higher-Order Function
An operation that produces the same result no matter how many times it's repeated.
APIs
Idempotent
A data structure that speeds up lookups on a specific column.
Database Design
Index
A SQL clause that combines rows from two or more tables based on a related column.
SQL
JOIN
A syntax extension letting you write HTML-like markup directly inside JavaScript.
React Development
JSX
JSON Web Token — a self-contained, signed token used to represent an authenticated user's session.
Authentication & Security
JWT
A concise Python syntax for building a new list by transforming/filtering another.
Python
List Comprehension
Monthly Recurring Revenue — predictable revenue a SaaS business earns each month from subscriptions.
SaaS Architecture
MRR
Minimum Viable Product — the smallest version of a product that delivers real value to test demand.
SaaS Architecture
MVP
An architecture where one codebase/database serves many customers while keeping their data isolated.
SaaS Architecture
Multi-Tenancy
Organizing database tables to reduce duplicate data.
Database Design
Normalization
A column that uniquely identifies each row in a relational database table.
Database Design
Primary Key
An object representing a value that isn't ready yet but will be, either fulfilled or rejected.
Advanced JavaScript
Promise
Data passed into a React component from its parent, similar to function arguments.
React Development
Props
Retrieval-Augmented Generation — combining an AI model with your own retrieved data so it answers using that content.
AI Development
RAG
Representational State Transfer — an API style using standard HTTP methods to access resources.
APIs
REST
An attack where untrusted input is inserted directly into a SQL query, manipulating it maliciously.
Authentication & Security
SQL Injection
Using HTML tags that describe the meaning of content (like <article>), not just its appearance.
HTML Foundations
Semantic HTML
The rule that determines which CSS style wins when multiple rules target the same element.
CSS Mastery
Specificity
Data a component manages internally that can change over time and triggers a re-render when updated.
React Development
State
Instructions given to an AI model that set its overall behavior before the actual conversation starts.
AI Development
System Prompt
A named container for storing a value that can be used and changed later in code.
JavaScript Fundamentals
Variable
A way for a service to call your API automatically when a specific event happens.
APIs
Webhook
A SQL function that calculates a value across related rows without collapsing them into one result.
SQL
Window Function
Cross-Site Scripting — an attack where malicious scripts are injected into a page and run in other users' browsers.
Authentication & Security
XSS
Syntax that lets asynchronous JavaScript code read top-to-bottom like synchronous code.