Posts by OOM_Killer

OOM_Killer's profile picture

Linux Filesystem. A Tour.

The folder structure in Linux follows the FHS (Filesystem Hierarchy Standard). FHS: /bin - base command binaries /boot - bootloader files /dev - devices /etc - PC configuration /home - home folders /lib - libraries and kernel modules /proc - information about the running system /media - mounting media (/mnt) /opt - additional software /root - admin home folder /sbin - main system configuration programs (firewall, iptables) /srv - data for system services /tmp - temporary files /usr - user binaries /var - variable files (frequently changing)

OOM_Killer's profile picture

TCP/IP Model

L1 - Data Link Layer: physical and data link layers from OSI; L2 - Internetwork Layer: network layer from OSI; L3 - Transport Layer: transport layer from OSI; L4 - Application Layer: session, presentation, application layers from OSI.

OOM_Killer's profile picture

Path Parameters vs Query Parameters

Use path parameters for required resource identifiers (/users/123) and query parameters for optional filters (/posts?author=nysv&limit=10). FastAPI handles both beautifully with automatic validation.

OOM_Killer's profile picture

CORS: The Bane of Frontend Devs

Getting CORS errors? FastAPI's CORSMiddleware is your friend. Just remember: be specific about allowed origins in production. Don't use '*' unless you really mean it.

OOM_Killer's profile picture

Debugging Async Code

Async bugs can be tricky. Use logging liberally, understand the event loop, and don't mix sync and async without care. asyncio.run() is your entry point.

OOM_Killer's profile picture

Security Headers Matter

Add security headers to your responses: X-Content-Type-Options, X-Frame-Options, Content-Security-Policy. Small effort, big security improvement.