Skip to content

Instantly share code, notes, and snippets.

@mxlje
Created August 2, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxlje/90c08f6c0ccf1161a947 to your computer and use it in GitHub Desktop.
Save mxlje/90c08f6c0ccf1161a947 to your computer and use it in GitHub Desktop.
Random ID TextExpander snippets
#!/usr/bin/env ruby
print `uuidgen`.downcase.split("-").take(2).join
#!/usr/bin/env ruby
print `uuidgen`.downcase.strip
@mxlje
Copy link
Author

mxlje commented Aug 2, 2014

I have them mapped to ;id and ;uuid respectively.

@stalcottsmith
Copy link

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