Skip to content

Instantly share code, notes, and snippets.

View dani-mp's full-sized avatar

Daniel Martín dani-mp

View GitHub Profile
@pesterhazy
pesterhazy / memorable-uuids.md
Last active January 11, 2024 08:50
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
//
// SimpleScrollingStack.swift
// A super-simple demo of a scrolling UIStackView in iOS 9
//
// Created by Paul Hudson on 10/06/2015.
// Learn Swift at www.hackingwithswift.com
// @twostraws
//
import UIKit