YAML Syntax Cheat Sheet — Scalars, Collections & Gotchas
Quick reference for YAML syntax: strings, numbers, multiline values, sequences, mappings, anchors, aliases, and common gotchas like the Norway problem.
Last updated:
Frequently Asked Questions
What is the Norway problem in YAML?
In YAML 1.1, the country code NO is interpreted as boolean false because YAML treats bare yes/no/on/off as booleans. Always quote country codes and similar values. YAML 1.2 fixes this by only treating true/false as booleans.
Can I use tabs for indentation in YAML?
No. YAML only allows spaces for indentation. Tabs will cause a parse error. Most editors can be configured to insert spaces when you press Tab.
Related Guides
Guide
Next.js Environment Variables: Complete Guide
How Next.js handles environment variables: .env files, NEXT_PUBLIC_ prefix, server vs client access, load order, and common production errors.
Guide
GitHub Actions: Secrets vs Environment Variables
When to use repository secrets, environment secrets, and configuration variables in GitHub Actions. Includes workflow examples for Node.js, Python, and Docker.
Guide
Environment Variables Security: Secrets, Leaks & Best Practices
Why environment variables are not truly secure and what to do about it. Covers secret rotation, leak detection, client-side exposure risks, and when to use a dedicated secrets manager.
Related Cheatsheets
Kubernetes (kubectl) Cheat Sheet
Quick reference for kubectl: contexts, core resources, pod operations, deployments, scaling, debugging, ConfigMaps, and Secrets.
Nginx Cheat Sheet — Server Blocks, Proxy & SSL
Quick reference for Nginx: service management, server blocks, reverse proxy, load balancing, SSL/TLS, location matching, logging, and performance tuning.
GitHub Actions Cheat Sheet
Quick reference for GitHub Actions CI/CD: workflow syntax, triggers, jobs, matrix strategies, secrets, caching, artifacts, reusable workflows, and essential actions.