Master Cloud Engineering & DevOps.
In-depth documentation, guided roadmaps, and browser-based developer tools for Azure, Kubernetes, Terraform, and the rest of the stack - free, no login required.
Learn. Build. Ship.
Browse by category
Databases
Indexing, normalization, transactions, and the storage-engine internals that decide whether a query takes a millisecond or a minute.
Frontend
Rendering models, layout systems, and the browser mechanics behind fast, accessible user interfaces.
Backend
API design, caching, and the server-side patterns that keep services fast and correct under load.
DevOps
Containers, networking, and the infrastructure primitives behind reliable deployments.
System Design
The distributed-systems building blocks used to reason about scale, availability, and trade-offs.
Algorithms
Complexity analysis and the core techniques for reasoning about how code performs at scale.
Security
Common vulnerability classes and the defensive patterns that keep applications and data safe.
Quick references
Commands, syntax, and examples - straight from the docs, not a separate cheat sheet to keep in sync.
| Level | Purpose | Deleting/removing it |
|---|---|---|
| Organization | Root container managing multiple accounts centrally | Requires all member accounts to be removed first |
| Organizational unit (OU) | Groups accounts for SCPs and policy application | Doesn't delete member accounts, just removes grouping |
| Member account | Billing and security isolation boundary | Closing an account is a distinct, deliberate, multi-step process |
| SCP | Caps maximum permissions for everything beneath it | Detaching it removes the ceiling, doesn't grant new access |
The commands below are grouped by service, not an exhaustive reference (see the official AWS CLI command reference for every flag), but the set that covers nearly all day-to-day aws CLI work.
| Command | Description | Copy |
|---|---|---|
aws configure | Interactively set the access key, secret key, default region, and output format. | |
aws sts get-caller-identity | Show the account ID and IAM user/role ARN currently authenticated as. | |
aws configure list | Show the current configuration values and where each one came from. |
| Command | Description | Copy |
|---|---|---|
aws iam list-users | List IAM users in the account. | |
aws iam create-user --user-name <name> | Create an IAM user. | |
aws iam attach-user-policy --user-name <name> --policy-arn <arn> | Attach a managed policy to a user. | |
aws iam list-roles | List IAM roles in the account. |
| Command | Description | Copy |
|---|---|---|
aws ec2 describe-instances | List EC2 instances and their details. | |
aws ec2 run-instances --image-id <ami> --instance-type t3.micro --count 1 | Launch a new EC2 instance. | |
aws ec2 start-instances --instance-ids <id> | Start a stopped instance. | |
aws ec2 stop-instances --instance-ids <id> | Stop a running instance. |
| Command | Description | Copy |
|---|---|---|
aws s3 ls | List S3 buckets in the account. | |
aws s3 ls s3://<bucket> | List objects inside a bucket. | |
aws s3 cp <file> s3://<bucket>/<key> | Upload a local file to a bucket. | |
aws s3 sync <dir> s3://<bucket> | Sync a local directory to a bucket, uploading only changed files. | |
aws s3 rb s3://<bucket> --force | Remove a bucket and its current objects. On a versioned bucket this does not remove prior object versions or delete markers; those must be explicitly cleaned up first, or the bucket deletion fails. |
| Command | Description | Copy |
|---|---|---|
aws cloudwatch list-metrics | List available CloudWatch metrics. | |
aws logs describe-log-groups | List CloudWatch Logs log groups. | |
aws logs tail <log-group> --follow | Stream a log group's events live. |
| Level | Purpose | Deleting it |
|---|---|---|
| Management group | Governance (policy, RBAC) across multiple subscriptions | Doesn't delete subscriptions, just removes grouping |
| Subscription | Billing and access-management boundary | Requires explicit cancellation, resources first |
| Resource group | Logical container for resources sharing a lifecycle | Deletes every resource inside it |
| Resource | An individual manageable object (VM, storage account...) | Deletes just that resource |
The commands below are grouped by resource type, not an exhaustive reference (see the official Azure CLI reference for every flag), but the set that covers nearly all day-to-day az CLI work.
| Command | Description | Copy |
|---|---|---|
az login | Sign in interactively, via the browser. | |
az account show | Show the currently active subscription. | |
az account list | List every subscription available to the signed-in account. | |
az account set --subscription <id> | Switch the active subscription for subsequent commands. |
| Command | Description | Copy |
|---|---|---|
az group create --name <rg> --location eastus | Create a resource group in a region. | |
az group list | List resource groups in the active subscription. | |
az group show --name <rg> | Show details of a resource group. | |
az group delete --name <rg> | Delete a resource group and every resource inside it. |
| Command | Description | Copy |
|---|---|---|
az vm create --resource-group <rg> --name <vm> --image Ubuntu2404 | Create a virtual machine. | |
az vm list | List VMs in the active subscription. | |
az vm start --resource-group <rg> --name <vm> | Start a stopped VM. | |
az vm deallocate --resource-group <rg> --name <vm> | Stop a VM and release its compute allocation, so it stops incurring compute charges. |
| Command | Description | Copy |
|---|---|---|
az storage account create --name <name> --resource-group <rg> --sku Standard_LRS | Create a storage account. | |
az storage container create --name <name> --account-name <account> | Create a blob container inside a storage account. | |
az storage blob upload --account-name <account> --container-name <container> --name <blob> --file <path> | Upload a local file as a blob. | |
az storage account list | List storage accounts in the active subscription. |
| Command | Description | Copy |
|---|---|---|
az aks create --resource-group <rg> --name <cluster> --node-count 3 --generate-ssh-keys | Create an AKS (managed Kubernetes) cluster. --generate-ssh-keys generates an SSH key pair automatically if one doesn't already exist, so the command succeeds even on a machine with no existing public key. | |
az aks get-credentials --resource-group <rg> --name <cluster> | Fetch cluster credentials into kubeconfig, so kubectl can target the cluster. | |
az aks list | List AKS clusters in the active subscription. | |
az aks scale --resource-group <rg> --name <cluster> --node-count 5 | Scale an AKS cluster's node pool. |
| Command | Description | Copy |
|---|---|---|
az monitor metrics list --resource <id> | Query metrics for a specific resource. | |
az monitor activity-log list | List subscription activity log events (who did what, and when). | |
az monitor log-analytics query --workspace <id> --analytics-query "<KQL>" | Run a Kusto (KQL) query against a Log Analytics workspace. |
| Concept | What it is | Note |
|---|---|---|
| Shebang | The first line, declaring which interpreter runs the script | #!/usr/bin/env bash is the portable form |
| Positional parameter | An argument passed to a script or function | $1, $2, ... $9, ${10} and beyond need braces |
| Exit status | A command's numeric result; 0 means success | Checked via $?, or directly in if/while |
| Subshell | A child shell running a command substitution or (...) group | Variables set inside it don't leak back to the parent |
The commands below are grouped by what you're trying to do, not an exhaustive reference (see the official GNU Bash Reference Manual for every detail), but the syntax that covers almost all everyday scripting.
#!/usr/bin/env bash
set -euo pipefail # exit on error, unset variable, or failed pipeline stage
echo "Script name: $0"
echo "First argument: $1"
echo "All arguments: $@"
echo "Argument count: $#"name="Ada"
echo "$name" # always quote a variable reference
echo "${name:-Unknown}" # default value if name is unset or empty
echo "${#name}" # length of the string
readonly PI=3.14 # constant - reassigning it is an error
export PATH="$PATH:/opt/bin" # visible to child processes tooif [[ "$name" == "Ada" ]]; then
echo "Hello, Ada"
fi
if [ -f "$file" ]; then
echo "$file exists"
fi
case "$1" in
start) echo "starting" ;;
stop) echo "stopping" ;;
*) echo "usage: $0 start|stop" ;;
esacfor f in *.log; do
echo "Found: $f"
done
while read -r line; do
echo "Line: $line"
done < input.txt
greet() {
local name="$1" # local - doesn't leak into the caller's scope
echo "Hi, $name"
}
greet "Ada"| Command | Description | Copy |
|---|---|---|
arr=(a b c) | Declare an indexed array. | |
echo "${arr[0]}" | Access an element by index. | |
echo "${arr[@]}" | Expand every element as separate words. | |
echo "${#arr[@]}" | Number of elements in the array. | |
arr+=(d) | Append an element. | |
declare -A map=([key]=value) | Declare an associative array (Bash 4+). |
| Command | Description | Copy |
|---|---|---|
cmd > file | Redirect stdout to a file, overwriting it. | |
cmd >> file | Redirect stdout to a file, appending. | |
cmd 2> file | Redirect stderr to a file. | |
cmd > file 2>&1 | Redirect both stdout and stderr to the same file. | |
cmd1 | cmd2 | Pipe cmd1's stdout into cmd2's stdin. | |
cmd < file | Feed a file's contents to a command's stdin. |
| Concept | Purpose | Lifetime |
|---|---|---|
| Image | Read-only, layered filesystem snapshot + metadata | Immutable once built |
| Container | A running (or stopped) instance of an image, plus a writable layer | Disposable, recreated freely |
| Volume | Named, Docker-managed persistent storage, mounted into a container | Long-lived, survives container removal |
| Network | Virtual network connecting containers, with built-in DNS by name | Long-lived |
| Compose service | One entry in a compose.yaml, describing how to run a container | Declarative, versioned with the project |
The commands below are grouped the way you'd reach for them day to day, not an exhaustive CLI reference (see the official Docker CLI reference for every flag), but the ones that cover almost all daily Docker work.
| Command | Description | Copy |
|---|---|---|
docker version | Show the Docker client and server (Engine) version. | |
docker info | Show system-wide information: storage driver, containers, images, resource limits. | |
docker login | Authenticate to a registry (Docker Hub by default). | |
docker logout | Remove locally stored registry credentials. | |
docker search nginx | Search Docker Hub for images matching a term. |
| Command | Description | Copy |
|---|---|---|
docker run -d -p 8080:80 --name web nginx | Run a container in the background, publish host port 8080 to container port 80, and name it "web". | |
docker ps | List running containers. | |
docker ps -a | List all containers, including stopped ones. | |
docker stop <container> | Gracefully stop a running container (SIGTERM, then SIGKILL after a timeout). | |
docker start <container> | Start a previously stopped container. | |
docker restart <container> | Stop then start a container. | |
docker exec -it <container> sh | Open an interactive shell inside a running container. | |
docker logs -f <container> | Stream a container's logs (add -f to follow). | |
docker rm <container> | Remove a stopped container. |
| Command | Description | Copy |
|---|---|---|
docker pull nginx:1.27 | Download an image from a registry, at a specific tag. | |
docker images | List locally stored images. | |
docker build -t app:1.0 . | Build an image from the Dockerfile in the current directory, tagged app:1.0. | |
docker tag app:1.0 registry.example.com/app:1.0 | Add another tag to an existing image, typically before pushing to a registry. | |
docker push registry.example.com/app:1.0 | Upload an image to a registry. | |
docker rmi app:1.0 | Remove a local image. | |
docker image prune | Remove dangling (untagged) images. |
| Command | Description | Copy |
|---|---|---|
docker network ls | List networks. | |
docker network create app-net | Create a user-defined bridge network; containers on it resolve each other by container name. | |
docker network inspect app-net | Show a network's configuration and which containers are attached. | |
docker network connect app-net web | Attach a running container to an additional network. | |
docker network rm app-net | Remove a network (fails if containers are still attached). |
| Command | Description | Copy |
|---|---|---|
docker volume ls | List volumes. | |
docker volume create db-data | Create a named, Docker-managed volume. | |
docker run -v db-data:/var/lib/postgresql/data postgres | Mount a named volume into a container at a given path. | |
docker volume inspect db-data | Show a volume's mountpoint and metadata. | |
docker volume rm db-data | Remove a volume - irreversible if nothing else has a copy of the data. |
| Command | Description | Copy |
|---|---|---|
docker compose up -d | Create and start every service in compose.yaml, in the background. | |
docker compose ps | List containers managed by this Compose project. | |
docker compose logs -f | Stream logs from every service. | |
docker compose exec api sh | Open a shell inside a running Compose service. | |
docker compose build | Build (or rebuild) images for services with a build: section. | |
docker compose down | Stop and remove containers and networks created by up. |
| Command | Description | Copy |
|---|---|---|
docker build --no-cache -t app:1.0 . | Rebuild ignoring every cached layer. | |
docker history app:1.0 | Show the layer history and size contribution of each layer. | |
docker system prune | Remove stopped containers, dangling images, and unused networks. | |
docker system prune -a | Also remove every unused image, not just dangling ones. | |
docker volume prune | Remove all unused volumes - irreversible data loss for anything unmounted. |
| Area | What it holds | Command that moves things into it |
|---|---|---|
| Working directory | Files as they exist on disk right now | (editing them directly) |
| Staging area (index) | Exactly what the next commit will contain | git add |
| Local repository | Permanent, immutable commit history | git commit |
| Remote | The shared copy other people push to and pull from | git push / git pull |
The commands below are grouped by what you're trying to do, not an exhaustive reference (see the official Git reference docs for every flag), but the set that covers nearly all day-to-day Git work.
| Command | Description | Copy |
|---|---|---|
git init | Initialize a new, empty repository in the current directory. | |
git clone <url> | Clone a remote repository into a new local directory. | |
git status | Show staged, unstaged, and untracked changes in the working directory. | |
git add <file> | Stage a file's changes for the next commit. | |
git add . | Stage every changed and new file in the current directory. | |
git commit -m "message" | Commit staged changes to history. | |
git commit -am "message" | Stage all changes to already-tracked files and commit, in one step. |
| Command | Description | Copy |
|---|---|---|
git branch | List local branches. | |
git branch -a | List local and remote-tracking branches. | |
git switch -c <branch> | Create a new branch and switch to it. | |
git switch <branch> | Switch to an existing branch. | |
git merge <branch> | Merge the named branch into the current branch, creating a merge commit if history has diverged. | |
git rebase <branch> | Reapply the current branch's commits on top of another branch's tip. | |
git branch -d <branch> | Delete a branch, only if it has already been merged. |
| Command | Description | Copy |
|---|---|---|
git remote -v | List configured remotes and their URLs. | |
git fetch | Download objects and refs from a remote, without merging anything into the current branch. | |
git pull | Fetch, then merge (or rebase, with --rebase) the remote-tracking branch into the current one. | |
git push | Push local commits on the current branch to its upstream. | |
git push -u origin <branch> | Push a new branch and set it to track origin/<branch> for future plain pushes and pulls. |
| Command | Description | Copy |
|---|---|---|
git restore <file> | Discard uncommitted working-directory changes to a file. | |
git restore --staged <file> | Unstage a file, keeping its working-directory changes intact. | |
git reset --soft HEAD~1 | Undo the last commit, keeping its changes staged. | |
git reset --hard HEAD~1 | Undo the last commit and discard its changes entirely - irreversible for anything not saved elsewhere. | |
git revert <commit> | Create a new commit that reverses a previous one - safe for commits already pushed or shared. |
| Command | Description | Copy |
|---|---|---|
git stash | Save uncommitted changes aside and return the working directory to HEAD. | |
git stash list | List saved stashes. | |
git stash pop | Reapply the most recent stash and remove it from the stash list. | |
git stash drop | Delete a stash without reapplying it. |
| Command | Description | Copy |
|---|---|---|
git tag | List tags. | |
git tag -a v1.0.0 -m "message" | Create an annotated tag (with a message and metadata) at the current commit. | |
git push origin v1.0.0 | Push a single tag to the remote. | |
git push --tags | Push every local tag to the remote. |
| Object | Purpose | Lifetime |
|---|---|---|
| Pod | Smallest deployable unit, one or more co-located containers | Ephemeral, disposable |
| Deployment | Manages a set of identical Pods, handles rollouts/rollbacks | Long-lived, declarative |
| Service | Stable virtual IP + DNS name routing to matching Pods | Long-lived |
| ConfigMap / Secret | Externalized configuration and sensitive values | Long-lived |
| Namespace | Logical partition of a cluster (isolation, not virtualization) | Long-lived |
The commands below are grouped by what you're trying to do, not an exhaustive reference (see the official kubectl reference for every flag), but the set that covers nearly all day-to-day cluster work.
| Command | Description | Copy |
|---|---|---|
kubectl get pods | List Pods in the current namespace. | |
kubectl get pods -o wide | List Pods with their node and IP address. | |
kubectl describe pod <name> | Show events, status, and container details for one Pod. | |
kubectl logs <pod> -f | Stream a Pod's logs (add -f to follow). | |
kubectl exec -it <pod> -- sh | Open an interactive shell inside a running Pod. | |
kubectl delete pod <name> | Delete a Pod directly; a Deployment will recreate it immediately if one manages it. |
| Command | Description | Copy |
|---|---|---|
kubectl apply -f deployment.yaml | Create or update resources declared in a manifest file. | |
kubectl get deployments | List Deployments and their ready/up-to-date/available replica counts. | |
kubectl rollout status deployment/<name> | Watch a Deployment rollout until it finishes. | |
kubectl rollout undo deployment/<name> | Roll a Deployment back to its previous revision. | |
kubectl scale deployment/<name> --replicas=5 | Change the desired replica count directly, without editing the manifest. | |
kubectl delete -f deployment.yaml | Delete every resource declared in a manifest file. |
| Command | Description | Copy |
|---|---|---|
kubectl get svc | List Services and their cluster IPs and ports. | |
kubectl describe svc <name> | Show a Service's selector, endpoints, and port mappings. | |
kubectl port-forward svc/<name> 8080:80 | Forward a local port to a Service, for local debugging without exposing it publicly. | |
kubectl expose deployment <name> --port=80 | Create a Service that targets an existing Deployment's Pods. |
| Command | Description | Copy |
|---|---|---|
kubectl get configmaps | List ConfigMaps in the current namespace. | |
kubectl create configmap <name> --from-file=<path> | Create a ConfigMap from a file or directory. | |
kubectl get secrets | List Secrets in the current namespace (values are not shown in plaintext). | |
kubectl create secret generic <name> --from-file=key=<path> | Create a Secret from a file's contents, avoiding passing credential values as shell arguments where they'd land in shell history and process listings. |
| Command | Description | Copy |
|---|---|---|
kubectl get events --sort-by=.lastTimestamp | List cluster events, most recent last - often the fastest way to spot a scheduling or image-pull failure. | |
kubectl get pods -A | List Pods across every namespace. | |
kubectl top pods | Show live CPU/memory usage per Pod (requires metrics-server). | |
kubectl get nodes | List cluster nodes and their status. |
| Concept | What it is | Note |
|---|---|---|
| Shell | The interactive command interpreter running the commands below | bash is the most common default, zsh is common on macOS |
| Kernel | The core process managing hardware, memory, and processes | Everything else, including the shell, runs as a process on top of it |
| Process | A running instance of a program, identified by a PID | Inspected and controlled with ps, top, kill |
| Filesystem Hierarchy Standard | The standardized directory layout (/etc, /var, /usr...) | Full breakdown in Linux Filesystem Hierarchy & Permissions |
| systemd unit | A managed, restartable background service | Controlled with systemctl, logged via journalctl |
The commands below are grouped by task, not alphabetically - not exhaustive (see the GNU Coreutils manual for every flag), but the set that covers almost all daily shell work.
| Command | Description | Copy |
|---|---|---|
pwd | Print the current working directory. | |
ls -la | List every file in the current directory, including hidden ones, in long format. | |
cd <dir> | Change the current directory. | |
mkdir -p <path> | Create a directory, including any missing parent directories. | |
cp -r <src> <dst> | Copy a file or directory recursively. | |
mv <src> <dst> | Move or rename a file or directory. | |
rm -rf <dir> | Remove a directory and its contents recursively, without confirmation. | |
cat <file> | Print a file's entire contents to standard output. | |
less <file> | View a file's contents one screen at a time. |
| Command | Description | Copy |
|---|---|---|
ls -l | Show permissions, owner, and group for files in a directory. | |
chmod 755 <file> | Set exact read/write/execute permissions for owner, group, and others via octal mode. | |
chmod u+x <file> | Add execute permission for the file's owner, leaving other bits untouched. | |
chown user:group <file> | Change a file's owner and group. | |
umask | Show (or set) the default permission mask applied to every newly created file. | |
sudo <command> | Run a single command with root privileges. |
| Command | Description | Copy |
|---|---|---|
ps aux | List every running process on the system. | |
top | Live, continuously updating view of running processes and resource usage. | |
kill <pid> | Send SIGTERM, asking a process to terminate gracefully. | |
kill -9 <pid> | Send SIGKILL, forcing immediate termination. | |
<command> & | Run a command in the background of the current shell. | |
jobs | List background jobs started from the current shell. | |
nohup <command> & | Run a command immune to hangups, so it keeps running after the shell exits. |
| Command | Description | Copy |
|---|---|---|
ip a | Show network interfaces and their assigned IP addresses. | |
ping <host> | Test network-layer reachability of a host. | |
ss -tulpn | List listening TCP/UDP sockets and the process using each. | |
curl -I <url> | Fetch just the HTTP response headers for a URL. | |
ssh user@host | Open an interactive remote shell over SSH. | |
scp <file> user@host:<path> | Copy a file to a remote host over SSH. | |
ssh-copy-id user@host | Install your public key on a remote host to enable passwordless login. |
| Command | Description | Copy |
|---|---|---|
systemctl status <service> | Show whether a systemd service is running, plus its most recent log lines. | |
systemctl start <service> | Start a service now, for the current boot session only. | |
systemctl enable --now <service> | Start a service now and configure it to also start automatically on every future boot. | |
journalctl -u <service> -f | Stream a systemd service's logs live. | |
tail -f /var/log/syslog | Stream a log file live as new lines are appended. |
| Command | Description | Copy |
|---|---|---|
df -h | Show disk space usage per mounted filesystem, in human-readable units. | |
du -sh <dir> | Show the total size of a directory, in human-readable units. | |
find <path> -name "<pattern>" | Find files by name under a directory tree. | |
grep -ri "<pattern>" <path> | Recursively, case-insensitively search file contents for a pattern. |
| Concept | What it is | Note |
|---|---|---|
| Table | A structured collection of rows with a fixed set of typed columns | Created with CREATE TABLE |
| Join | Combining rows from two or more tables via a matching condition | INNER/LEFT/RIGHT/FULL behave differently on non-matches |
| Transaction | A group of statements that succeed or fail together | BEGIN / COMMIT / ROLLBACK |
| Role | An account with login and/or permission attributes | Granted specific privileges via GRANT |
| Index | A separate structure that speeds up lookups on a column | Deep dive: PostgreSQL Indexes |
The commands below are grouped by task, not an exhaustive reference (see the official PostgreSQL SQL command reference for every clause), but the set that covers nearly all everyday PostgreSQL work.
| Command | Description | Copy |
|---|---|---|
CREATE DATABASE app; | Create a new database. | |
\c app | Connect to a different database (psql meta-command). | |
\l | List all databases (psql meta-command). | |
CREATE TABLE users (id serial PRIMARY KEY, email text UNIQUE NOT NULL); | Create a table with a primary key and a unique constraint. | |
ALTER TABLE users ADD COLUMN created_at timestamptz DEFAULT now(); | Add a column with a default value. | |
\d users | Describe a table's columns, indexes, and constraints (psql). |
| Command | Description | Copy |
|---|---|---|
SELECT * FROM users WHERE email = 'ada@example.com'; | Filter rows by a condition. | |
SELECT * FROM users ORDER BY created_at DESC LIMIT 10; | Sort and limit results. | |
SELECT o.id, u.email FROM orders o INNER JOIN users u ON u.id = o.user_id; | Combine only matching rows from two tables. | |
SELECT u.email, o.id FROM users u LEFT JOIN orders o ON o.user_id = u.id; | Keep every row from the left table, even without a match on the right. | |
SELECT DISTINCT country FROM users; | Return only unique values. |
| Command | Description | Copy |
|---|---|---|
SELECT COUNT(*) FROM users; | Count rows. | |
SELECT country, COUNT(*) FROM users GROUP BY country; | Count rows per group. | |
SELECT country, COUNT(*) FROM users GROUP BY country HAVING COUNT(*) > 100; | Filter groups after aggregation. | |
SELECT AVG(total), SUM(total) FROM orders; | Compute an average and a sum across all matching rows. |
| Command | Description | Copy |
|---|---|---|
SELECT id, total, ROW_NUMBER() OVER (ORDER BY total DESC) FROM orders; | Number rows by rank, without collapsing them the way GROUP BY would. | |
SELECT id, total, RANK() OVER (PARTITION BY user_id ORDER BY total DESC) FROM orders; | Rank rows within each partition (group), keeping every row in the output. | |
SELECT id, total, SUM(total) OVER (PARTITION BY user_id) AS user_total FROM orders; | Show a group total alongside every individual row. |
| Command | Description | Copy |
|---|---|---|
BEGIN; | Start a transaction block. | |
COMMIT; | Persist every change made inside the transaction. | |
ROLLBACK; | Discard every change made inside the transaction. | |
SAVEPOINT before_update; | Mark a point to roll back to, without discarding the whole transaction. | |
ROLLBACK TO SAVEPOINT before_update; | Undo changes back to a specific savepoint. |
| Command | Description | Copy |
|---|---|---|
CREATE ROLE app_user LOGIN; | Create a role that can log in, with no password set yet. Set one interactively afterward with psql's \password app_user, which never puts the cleartext value in a command, shell history, or server log. | |
GRANT SELECT, INSERT ON users TO app_user; | Grant specific privileges on a table to a role. | |
REVOKE INSERT ON users FROM app_user; | Remove a previously granted privilege. | |
\du | List roles and their attributes (psql meta-command). |
| Command | Description | Copy |
|---|---|---|
CREATE INDEX idx_users_email ON users (email); | Create a standard B-tree index on a column. | |
CREATE INDEX idx_orders_user_id ON orders (user_id); | Index a foreign key column; Postgres doesn't create one automatically, and joins/lookups on orders.user_id benefit from it directly. | |
EXPLAIN ANALYZE SELECT * FROM users WHERE email = 'ada@example.com'; | Show the real query plan and actual execution time. | |
\di | List indexes (psql meta-command). |
| Concept | Example | Note |
|---|---|---|
| Variable assignment | x = 5 | No type declaration; type is inferred at runtime |
| Function definition | def f(x, y=10): ... | Default values evaluated once, at definition time |
| f-string | f"{name} is {age}" | Preferred string formatting since Python 3.6 |
| Truthiness | if items: | Empty collections/0/None/"" are falsy |
| Type hints | def f(x: int) -> str: | Optional, not enforced at runtime |
The groups below aren't an exhaustive language reference (see the official Python tutorial and built-in types documentation for that), but the everyday syntax that covers almost all beginner-to-intermediate Python code.
x = 5 # int
y = 3.14 # float
name = "Ada" # str
is_valid = True # bool
nothing = None # NoneType
a, b = 1, 2 # multiple assignment
a, b = b, a # swap without a temporary variablenums = [1, 2, 3]
nums.append(4) # [1, 2, 3, 4]
nums[0] # 1 (first item)
nums[-1] # 4 (last item)
nums[1:3] # [2, 3] (slice)
squares = [n * n for n in nums] # list comprehensionperson = {"name": "Ada", "age": 30}
person["age"] # 30
person.get("email", "n/a") # "n/a" - no KeyError if missing
person["email"] = "ada@example.com"
unique = {1, 2, 2, 3} # {1, 2, 3} - duplicates dropped
unique.add(4)for n in [1, 2, 3]:
print(n)
for i, n in enumerate(["a", "b"]):
print(i, n) # 0 a, then 1 b
n = 0
while n < 3:
n += 1def greet(name, greeting="Hello"):
return f"{greeting}, {name}!"
def total(*args, **kwargs):
return sum(args)
square = lambda x: x * xclass User:
def __init__(self, name):
self.name = name
def greet(self):
return f"Hi, {self.name}"
class Admin(User):
def greet(self):
return f"{super().greet()} (admin)"try:
result = 10 / 0
except ZeroDivisionError as e:
print(f"Can't divide by zero: {e}")
finally:
print("Always runs")
raise ValueError("Invalid input")| Concept | What it is | Command |
|---|---|---|
| Provider | Plugin that talks to a specific API (AWS, Azure, GCP, Cloudflare...) | Declared in a required_providers block |
| Resource | A single infrastructure object Terraform manages | resource "type" "name" { ... } |
| State | Terraform's record of what it created, mapped to real object IDs | terraform show, terraform state list |
| Plan | A dry-run diff between config and state | terraform plan |
| Apply | Executes a plan against real infrastructure | terraform apply |
The commands below are grouped by workflow stage, not an exhaustive reference (see the official Terraform CLI docs for every flag), but the set that covers nearly all day-to-day Terraform work.
| Command | Description | Copy |
|---|---|---|
terraform init | Initialize a working directory: download providers/modules and configure the backend. | |
terraform fmt | Rewrite configuration files to the canonical style. | |
terraform validate | Check configuration for syntax and internal consistency errors, without touching real infrastructure. | |
terraform version | Show the Terraform and provider versions in use. |
| Command | Description | Copy |
|---|---|---|
terraform plan | Show a dry-run diff between configuration and current state. | |
terraform plan -out=tfplan | Save a computed plan to a file, so the exact reviewed plan is what gets applied. Treat tfplan as a sensitive artifact, it can contain secrets in cleartext, so never commit it or share it broadly. | |
terraform show | Show the current state, or a saved plan file, in human-readable form. | |
terraform graph | Generate a visual dependency graph of resources. |
| Command | Description | Copy |
|---|---|---|
terraform apply | Apply changes to reach the desired state, prompting for confirmation. | |
terraform apply tfplan | Apply a previously saved plan file exactly - no new diff computed at apply time. | |
terraform apply -auto-approve | Apply without an interactive confirmation prompt - for CI pipelines, not interactive use. | |
terraform destroy | Destroy every resource Terraform currently manages in state. |
| Command | Description | Copy |
|---|---|---|
terraform state list | List every resource tracked in the current state. | |
terraform state show <resource> | Show current state attributes for one resource. | |
terraform state rm <resource> | Remove a resource from state without destroying the real infrastructure behind it. | |
terraform import <resource> <id> | Bring an existing, unmanaged resource under Terraform management. | |
terraform workspace new <name> | Create a new workspace - an isolated state, e.g. for a separate environment. |
Developer tools
Runs entirely in your browser.
JSON Formatter
Format, validate, and minify JSON, runs entirely in your browser, nothing is sent anywhere.
Runs in your browserBase64 Encoder
Encode or decode Base64 text with correct UTF-8 handling; runs entirely in your browser.
Runs in your browserUUID Generator
Generate cryptographically random v4 UUIDs; runs entirely in your browser.
Runs in your browserHash Generator
Generate SHA-1, SHA-256, SHA-384, or SHA-512 digests of text, runs entirely in your browser.
Runs in your browserRegex Tester
Test a regular expression against sample text with live match highlighting and capture groups; runs entirely in your browser.
Runs in your browserJWT Decoder
Decode a JWT header and payload; runs entirely in your browser, the signature is not verified since no secret is available client-side.
Runs in your browserSubnet Calculator
Calculate network address, broadcast address, usable host range, and subnet mask from an IPv4 CIDR, runs entirely in your browser.
Runs in your browserCron Generator
Build a 5-field cron expression from structured minute, hour, day, month, and weekday inputs with a human-readable description; runs entirely in your browser.
Runs in your browserLatest from the blog
Introducing Roadmaps: Structured Paths Through Cloud Tech by Victor
Roadmaps are ordered, curated paths through existing Cloud Tech by Victor topics for a given role, read-only, no accounts, nothing to save.
- roadmaps
- announcement
- product
Why Cloud Tech by Victor Will Never Require a Login
No accounts, no saved progress, no paywall, a look at why Cloud Tech by Victor is built to stay a pure reference, not a platform.
- product
- philosophy
- engineering
Building a Production-Ready AKS GitOps Platform with Terraform and ArgoCD
The DevOps Project That Finally Made Kubernetes, GitOps, and Terraform Click
- aks-gitops-project
- aks-production-deployment
- aks-terraform-deployment
Popular docs
AWS Organizations & Account Structure
How AWS Organizations, organizational units, and the AWS account itself form the real isolation boundary, and why that structure - not any single resource - is where governance and billing actually happen.
Azure Fundamentals
How Azure organizes resources through management groups, subscriptions, and resource groups, and why that hierarchy, not the resources themselves, is where most governance actually happens.
Bash Fundamentals
The scripting layer built on top of the shell - variables, conditionals, loops, and functions - and the quoting and exit-status habits that separate a script that looks right from one that fails safely.
Docker Fundamentals
How images, containers, volumes, and networks fit together in Docker's runtime model, and the mental shift from "installing software" to "running a packaged image" that trips up newcomers.
Git Fundamentals
How the working directory, staging area, and commit history actually relate to each other, and why understanding that three-stage model makes branching, rebasing, and undoing changes stop feeling arbitrary.
Kubernetes Fundamentals
How Pods, Deployments, and Services fit together, what the control loop actually does, and why Kubernetes networking confuses people coming straight from Docker Compose.
Recently updated
Every page shows its last-reviewed date, nothing here is stale and unlabeled.
AWS CloudWatch & CloudTrail
How CloudWatch metrics, logs, and alarms fit together with CloudTrail's audit trail, and why CloudTrail answers "who did what" while CloudWatch answers "what is the system doing."
AWS Compute
How EC2, Lambda, ECS, and EKS trade control for convenience differently, and how to actually choose between them instead of defaulting to whichever one you already know.
AWS IAM
How IAM users, roles, and policies control access in AWS, why roles with temporary credentials are preferred over long-lived access keys, and how policy evaluation actually decides allow versus deny.
AWS Organizations & Account Structure
How AWS Organizations, organizational units, and the AWS account itself form the real isolation boundary, and why that structure - not any single resource - is where governance and billing actually happen.
AWS Storage
How S3, EBS, and EFS fit different access patterns, what S3 storage classes actually trade off, and why durability and availability are two different numbers.
AWS VPC Networking
How Amazon VPC, subnets, security groups, and network ACLs control traffic in AWS, and why security groups (stateful, instance-level) and network ACLs (stateless, subnet-level) are not interchangeable.
Roadmaps
Structured learning paths
AI Engineer Roadmap
From LLM fundamentals and prompt engineering through embeddings, retrieval-augmented generation, tool use, and evaluation, the core path for building real LLM-powered applications, linked into Cloud Tech by Victor topic references.
AWS Cloud Engineer Roadmap
From the AWS account structure through identity, networking, compute, storage, and monitoring, the core path for a working AWS engineer, linked into Cloud Tech by Victor topic references.
Azure Engineer Roadmap
From the Azure resource hierarchy through identity, networking, compute, storage, and monitoring, the core path for a working Azure engineer, linked into Cloud Tech by Victor topic references.
Backend Developer Roadmap
A structured path through the data, API, caching, security, and scaling fundamentals every backend engineer needs, each step links straight into a full Cloud Tech by Victor reference.
Cloud Engineer Roadmap
Vendor-agnostic cloud fundamentals, service models, identity, networking, through to provisioning, orchestration, and cost management, linked into Cloud Tech by Victor topic references.
DevOps Engineer Roadmap
From container networking and infrastructure as code through orchestration, delivery automation, and observability, the core path for a working DevOps engineer, linked into Cloud Tech by Victor topic references.
DevSecOps Engineer Roadmap
From least-privilege identity and secrets management through a hardened CI/CD pipeline, container and Kubernetes security, and policy-as-code for infrastructure, the core path for shifting security left, linked into Cloud Tech by Victor topic references.
Frontend Developer Roadmap
From layout fundamentals to talking with real APIs and reasoning about performance, the core path for a working frontend engineer, linked into Cloud Tech by Victor topic references.
Full-Stack Engineer Roadmap
A single path through the frontend, data, API, security, and operations fundamentals a full-stack engineer needs, bridging the existing Frontend and Backend Developer roadmaps into one sequence, each step links straight into a full Cloud Tech by Victor reference.
Linux Engineer Roadmap
From the filesystem hierarchy and permissions through users, networking, process management, storage, and logging, the core path for a working Linux engineer, linked into Cloud Tech by Victor topic references.
Platform Engineer Roadmap
From orchestration and infrastructure-as-code foundations through GitOps delivery and service mesh, up to building a real internal developer platform, linked into Cloud Tech by Victor topic references.
Python Developer Roadmap
From syntax and data structures through tooling, testing, async programming, and web frameworks, the core path for a working Python developer, linked into Cloud Tech by Victor topic references.
Popular comparisons
PostgreSQL vs MySQL
How PostgreSQL and MySQL actually differ in data types, concurrency, indexing, and replication, and which one fits which workload.
- postgresql
- mysql
- databases
REST vs GraphQL
How REST and GraphQL differ in fetching, caching, and versioning, and which fits a given API better.
- rest
- graphql
- api
Most popular starting point
Start your journey: Azure Engineer
New to Azure Engineer? Start here, in order.
- 1Learn the resource hierarchyManagement groups, subscriptions, and resource groups are where governance actually happens, everything else is deployed within that structure.
- 2Control identity and accessEntra ID governs both human sign-in and workload authentication, the security foundation everything else sits behind.
- 3Design network isolationVirtual Networks, subnets, and Network Security Groups determine what's reachable from where before any workload is deployed.
- 4Choose where workloads runWith identity and networking decisions made, pick the right compute model, VMs, App Service, or AKS, for the actual workload.
- 5Store and protect dataBlob, File, and Disk storage cover different access patterns compute workloads depend on, each with its own redundancy trade-offs.
- 6See what's actually happeningOnce compute and storage are running, Azure Monitor and KQL are what let you understand and debug what's actually happening in production.