// REFERENCES
Developer
CHEAT SHEETS.
Quick reference for CLI commands and development tools, from Git and Docker to SQL and HTTP status codes. Everything in one place and copyable in one click.
103 commandsGit
› Setup & Init
git initInitialize a new Git repository.
git clone [url]Clone an existing repository.
git config --global user.name "[name]"Set the author name.
git config --global user.email "[email]"Set the author email.
› Stage & Snapshot
git statusShow modified files in working directory.
git add [file]Add a file to the staging area.
git add .Add all current changes to the staging area.
git commit -m "[message]"Commit staged files with a message.
git commit --amendModify the last commit.
› Branch & Merge
git branchList all local branches.
git branch [name]Create a new branch.
git checkout [branch]Switch to a specific branch.
git checkout -b [branch]Create and switch to a new branch.
git merge [branch]Merge a branch into the active branch.
git branch -d [branch]Delete a local branch.
› Stash
git stashTemporarily store modified, tracked files.
git stash popRestore the most recently stashed files.
git stash listList all stashed changes.
git stash dropDiscard the most recently stashed files.
Docker
› Images
docker pull [image]Download an image from a registry.
docker imagesList all local images.
docker rmi [image]Remove a local image.
docker build -t [name] .Build an image from a Dockerfile in the current directory.
› Containers
docker psList all running containers.
docker ps -aList all containers (running and stopped).
docker run [image]Create and start a container from an image.
docker run -d -p 8080:80 [image]Run container in background and map port.
docker stop [container]Gracefully stop a running container.
docker rm [container]Remove a stopped container.
docker exec -it [container] shAccess the shell of a running container.
› Docker Compose
docker compose upCreate and start containers.
docker compose up -dStart containers in detached mode.
docker compose downStop and remove containers, networks.
docker compose logs -fView output from containers continuously.
Linux CLI
› File Operations
ls -laList all files in long format (including hidden).
cd [dir]Change directory.
pwdPrint working directory.
mkdir [dir]Create a new directory.
rm -rf [dir]Force remove a directory and its contents recursively.
cp -r [src] [dest]Copy files and directories recursively.
mv [src] [dest]Move or rename files or directories.
› Permissions
chmod 755 [file]Set rwx for owner, rx for group/others.
chown [user]:[group] [file]Change file owner and group.
› Process & Network
topDisplay Linux processes.
htopInteractive process viewer (if installed).
kill -9 [pid]Force kill a process by ID.
netstat -tulpnList all listening ports and their PIDs.
curl -I [url]Fetch HTTP headers of a URL.
Kubernetes
› Basic Commands (kubectl)
kubectl get nodesList all nodes in the cluster.
kubectl get podsList all pods in the current namespace.
kubectl get pods -AList all pods in all namespaces.
kubectl describe pod [name]Show detailed information about a pod.
kubectl delete pod [name]Delete a pod.
› Deployments & Services
kubectl get deploymentsList deployments.
kubectl get svcList services.
kubectl apply -f [file.yaml]Apply a configuration file.
kubectl port-forward svc/[name] 8080:80Forward local port to a service.
kubectl logs -f [pod_name]Stream logs from a pod.
SQL
› Data Querying (DQL)
SELECT * FROM table;Select all columns from a table.
SELECT col1, col2 FROM table WHERE condition;Select specific columns with a condition.
SELECT * FROM table ORDER BY col DESC LIMIT 10;Sort results descending and limit to 10.
› Data Manipulation (DML)
INSERT INTO table (col) VALUES (val);Insert a new row.
UPDATE table SET col = val WHERE condition;Update existing rows.
DELETE FROM table WHERE condition;Delete rows matching a condition.
› Joins & Grouping
SELECT * FROM t1 INNER JOIN t2 ON t1.id = t2.id;Inner join two tables.
SELECT * FROM t1 LEFT JOIN t2 ON t1.id = t2.id;Left join two tables.
SELECT col, COUNT(*) FROM table GROUP BY col;Group rows and count occurrences.
NPM & Yarn
› NPM Commands
npm init -yInitialize a new project with defaults.
npm install [pkg]Install a package and add to dependencies.
npm install -D [pkg]Install a package as a devDependency.
npm run [script]Run a script defined in package.json.
npm updateUpdate all packages to the latest allowed versions.
› Yarn Equivalents
yarn init -yInitialize a new project.
yarn add [pkg]Install a package.
yarn add -D [pkg]Install a devDependency.
yarn [script]Run a script.
yarn upgradeUpdate all packages.
Flutter
› Project Setup
flutter create [name]Create a new Flutter project.
flutter doctorCheck your Flutter environment status.
flutter cleanDelete the build/ directory.
› Run & Build
flutter runRun the app on an attached device.
flutter build apkBuild an Android APK.
flutter build iosBuild an iOS app bundle.
› Packages
flutter pub getGet dependencies listed in pubspec.yaml.
flutter pub add [pkg]Add a new dependency to pubspec.yaml.
flutter pub upgradeUpgrade dependencies to latest compatible versions.
Dart
› Basic CLI
dart run [file.dart]Execute a Dart script.
dart format .Format all Dart files in the current directory.
dart analyzeAnalyze the project's Dart code for errors/warnings.
dart fix --applyAutomatically fix formatting and simple errors.
› Testing & Compilation
dart testRun unit tests.
dart compile exe [file.dart]Compile a Dart script into a standalone executable.
HTTP Status
› 2xx Success
200 OKStandard response for successful HTTP requests.
201 CreatedRequest fulfilled and new resource created.
204 No ContentRequest successful, but no content to return.
› 4xx Client Errors
400 Bad RequestThe server cannot process the request due to client error.
401 UnauthorizedAuthentication is required and has failed or not provided.
403 ForbiddenClient does not have access rights to the content.
404 Not FoundThe server can not find the requested resource.
429 Too Many RequestsThe user has sent too many requests in a given amount of time.
› 5xx Server Errors
500 Internal Server ErrorThe server encountered an unexpected condition.
502 Bad GatewayThe server acting as a gateway received an invalid response.
503 Service UnavailableThe server is not ready to handle the request.
No results
Try a different keyword.