Skip to content

Instantly share code, notes, and snippets.

View frankvilhelmsen's full-sized avatar

Frank Vilhelmsen frankvilhelmsen

View GitHub Profile
UUID uuid = UUID.randomUUID()
String partone = ""+ Long.toString(uuid.getMostSignificantBits(), 36)
String parttow = ""+ Long.toString(uuid.getLeastSignificantBits(), 36)
String k = "PREFIX$partone$parttow".replace("-", "")
String l = k.length()
println "UUID short version ($l) : $k"