Skip to content
Skillo.dev

Developer Resources

Handy cheatsheets and quick references for everyday development.

Git

  • git switch -c feature

    Create and switch to a new branch

  • git restore --staged <file>

    Unstage a file

  • git rebase -i HEAD~3

    Interactively rewrite the last 3 commits

  • git log --oneline --graph

    Compact commit graph

  • git stash pop

    Reapply the most recent stash

  • git reset --hard origin/main

    Discard local changes to match remote

Docker

  • docker ps -a

    List all containers

  • docker compose up -d

    Start services in the background

  • docker exec -it <id> sh

    Open a shell inside a container

  • docker logs -f <id>

    Follow container logs

  • docker system prune -af

    Remove unused data (careful)

  • docker build -t app .

    Build an image from the Dockerfile

Linux

  • grep -rn 'text' .

    Recursively search for text with line numbers

  • chmod +x script.sh

    Make a script executable

  • tar -xzf file.tar.gz

    Extract a gzipped tarball

  • ss -tulpn

    List listening ports

  • systemctl status nginx

    Check a service's status

  • df -h

    Show disk usage, human readable

SQL

  • SELECT * FROM t LIMIT 10;

    Preview the first rows

  • CREATE INDEX idx ON t(col);

    Add an index to speed lookups

  • EXPLAIN ANALYZE <query>;

    Inspect a query plan

  • LEFT JOIN b ON a.id = b.a_id

    Keep all left rows

  • GROUP BY col HAVING COUNT(*) > 1

    Filter groups after aggregation

  • UPDATE t SET x=1 WHERE id=5;

    Update matching rows

Next.js

  • export const revalidate = 60

    ISR: revalidate a route every 60s

  • 'use client'

    Mark a component as client-side

  • generateStaticParams()

    Pre-render dynamic routes at build

  • revalidatePath('/news')

    Invalidate a cached route after a mutation

  • notFound()

    Render the 404 boundary

  • <Image fill sizes=... />

    Responsive optimized images

Security

  • openssl rand -base64 32

    Generate a strong secret

  • ssh-keygen -t ed25519

    Create a modern SSH key

  • curl -I https://site

    Inspect response headers

  • chmod 600 ~/.ssh/id_ed25519

    Lock down a private key

  • dig +short example.com

    Quick DNS lookup

  • nmap -sV host

    Service/version detection