Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
Last active January 11, 2024 08:50
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pesterhazy/120e1926dfeff603c264268fdf52adfb to your computer and use it in GitHub Desktop.
Save pesterhazy/120e1926dfeff603c264268fdf52adfb to your computer and use it in GitHub Desktop.
A UUID to remember

In their most used version v4, UUIDs are random, and that's a useful property. But sometimes all you want is a UUID that is easy to remember. To hell with randomness!

A minor complication is that for a string to parse as a valid UUID, the variant and version bits should be set correctly (to 2 and 4, respectively). Here are a few suggestions that pass the test:

facade00-0000-4000-a000-000000000000
decade00-0000-4000-a000-000000000000
ad0be000-0000-4000-a000-000000000000
c0c0a000-0000-4000-a000-000000000000
5ca1ab1e-0000-4000-a000-000000000000
f100ded0-0000-4000-a000-000000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment