-
-
Save mxlje/90c08f6c0ccf1161a947 to your computer and use it in GitHub Desktop.
Random ID TextExpander snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
print `uuidgen`.downcase.split("-").take(2).join |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
print `uuidgen`.downcase.strip |
I prefer base 36 which can also be case invariant.
Here is my goto solution: https://gist.github.com/stalcottsmith/1b74155cbfe3a23d8573
Which gives me numbers like:
tg9wa3kblz9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have them mapped to
;id
and;uuid
respectively.