Skip to content

Instantly share code, notes, and snippets.

@lancelotj
Created April 8, 2011 18:42
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 lancelotj/910459 to your computer and use it in GitHub Desktop.
Save lancelotj/910459 to your computer and use it in GitHub Desktop.
Create a short unique id within range of number, alphabet, - and _ from uuid
import base64, uuid
base64.b64encode(uuid.uuid4().bytes, '_-')[:22]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment