Skip to main content

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:

  • TitleMake it clear what this gist is for.
  • DescriptionAdd context about when or how to use these snippets.
  • FilesAdd one or more code files. Each file has a name, language, and content.
  • LicenseOptionally 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 FilterFilter gists by programming language to quickly find what you need.
  • SearchSearch across titles, descriptions, and even file content.
  • PinningPin your most-used gists to the top for quick access.
  • ArchivingArchive 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 descriptionsFuture you will thank you for explaining what this gist is for.
  • Add a licenseChoose an SPDX license so others know how your code can be used.
  • One concept per gistKeep related files together, but don't dump everything in one giant gist.