Skip to content

Instantly share code, notes, and snippets.

@buxx
Last active July 4, 2017 14: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 buxx/f722109aadffb63816edc7375fbb68a0 to your computer and use it in GitHub Desktop.
Save buxx/f722109aadffb63816edc7375fbb68a0 to your computer and use it in GitHub Desktop.
bash aliases
alias uuid="python -c 'import uuid; print(uuid.uuid4())'"
alias gen="python -c 'import uuid; print(str(uuid.uuid4()).replace(\"-\", \"\"))'"
alias freezelist="python -c \"import pip; print(list(sorted(['{}{}'.format(d.project_name, '=={}'.format(getattr(d, 'version')) if getattr(d, 'version') else '') for d in pip.get_installed_distributions(local_only=True)], key=lambda s: s.lower())))\""
alias prettyjson='python -m json.tool'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment