Gists
Code snippet collections with syntax highlighting and organization tools.
What Are Gists?
Gists are collections of code snippets you want to keep handy. Each gist can contain multiple files with syntax highlighting for easy reading.
Perfect for configuration files, quick scripts, code templates, or anything you reference regularly.
Creating Your First Gist
Click **New Gist** to start. Give it a descriptive title so you can find it later.
Here's what you can add:
- Title — Make it clear what this gist is for.
- Description — Add context about when or how to use these snippets.
- Files — Add one or more code files. Each file has a name, language, and content.
- License — Optionally specify an SPDX license identifier (e.g., MIT, Apache-2.0).
Multi-File Support
Need to keep related files together? Add multiple files to a single gist. Great for configuration files that work together or before/after examples.
Example: Store your Docker Compose file alongside the Dockerfile, or keep component code with its CSS.
Syntax Highlighting
Choose the language for each file and get proper syntax highlighting automatically. Makes code much easier to read at a glance.
Supports all major languages: JavaScript, TypeScript, Python, Go, Rust, and many more.
Finding What You Need
Several ways to keep gists organized:
- Language Filter — Filter gists by programming language to quickly find what you need.
- Search — Search across titles, descriptions, and even file content.
- Pinning — Pin your most-used gists to the top for quick access.
- Archiving — Archive old gists to keep your list clean without losing anything.
Making the Most of Gists
- Use descriptive names — "Docker Config" is better than "config1".
- Add descriptions — Future you will thank you for explaining what this gist is for.
- Add a license — Choose an SPDX license so others know how your code can be used.
- One concept per gist — Keep related files together, but don't dump everything in one giant gist.