Skip to main content
Back to Resources

Cheatsheets

Quick reference guides for common programming languages, frameworks, and tools. Bookmark this page for easy access.

Version Control

Git Commands

Essential Git commands for version control

git clone <url> - Clone a repository
git add . - Stage all changes
git commit -m "message" - Commit changes
git push origin main - Push to remote
git pull - Fetch and merge
git branch <name> - Create branch
git checkout <branch> - Switch branches
git merge <branch> - Merge branch
git stash - Stash changes
git log --oneline - Compact history
JavaScript

JavaScript ES6+

Modern JavaScript syntax and features

const/let - Block-scoped variables
Arrow functions: () => {}
Template literals: `Hello ${name}`
Destructuring: { a, b } = obj
Spread operator: [...arr]
Rest parameters: (...args)
Promises: .then().catch()
Async/await
Array methods: map, filter, reduce
Optional chaining: obj?.prop
Python

Python Basics

Python syntax quick reference

List comprehension: [x for x in range(10)]
Dictionary: {key: value}
Lambda: lambda x: x * 2
f-strings: f"Hello {name}"
try/except/finally
with open() as file:
__init__(self) - Constructor
pip install <package>
virtualenv venv
if __name__ == "__main__":
React

React Hooks

React hooks at a glance

useState - State management
useEffect - Side effects
useContext - Context consumer
useReducer - Complex state
useCallback - Memoize callbacks
useMemo - Memoize values
useRef - Refs and persistence
useLayoutEffect - Sync effects
Custom hooks: use<Name>
Rules: Top-level only
Database

SQL Queries

Common SQL operations

SELECT * FROM table
WHERE condition
ORDER BY column ASC/DESC
GROUP BY column
JOIN table ON condition
LEFT/RIGHT/FULL JOIN
INSERT INTO table VALUES
UPDATE table SET column = value
DELETE FROM table WHERE
CREATE INDEX ON table(column)
DevOps

Terminal Commands

Essential command line

ls -la - List all files
cd <dir> - Change directory
mkdir <dir> - Create directory
rm -rf <dir> - Remove recursively
cp -r <src> <dest> - Copy
mv <src> <dest> - Move/rename
cat <file> - View file
grep "pattern" file - Search
chmod +x file - Make executable
curl -X GET <url> - HTTP request
TypeScript

TypeScript Essentials

TypeScript type annotations

type Alias = string | number
interface IUser { name: string }
Array<T> or T[]
Record<K, V> - Object type
Partial<T> - All optional
Required<T> - All required
Pick<T, K> - Select keys
Omit<T, K> - Exclude keys
keyof T - Union of keys
typeof variable - Type from value
CSS

CSS Flexbox & Grid

Modern CSS layouts

display: flex/grid
justify-content: center
align-items: center
flex-direction: row/column
flex-wrap: wrap
gap: 1rem
grid-template-columns: repeat(3, 1fr)
grid-gap: 1rem
place-items: center
flex: 1 1 auto