Skip to content

Instantly share code, notes, and snippets.

@mariocesar
Last active July 8, 2024 20:29
Show Gist options
  • Save mariocesar/1b6ab784bde1f1fa47073c96566f6590 to your computer and use it in GitHub Desktop.
Save mariocesar/1b6ab784bde1f1fa47073c96566f6590 to your computer and use it in GitHub Desktop.
Useful oneliners that I often forget. #terminal #python #shell

direnv

List all the available functions in the standard lib:

direnv stdlib | grep -o -E "^(\w+)\(\)"
...
use_node()
use_nodenv()
use_nix()
use_flake()
use_guix()
use_vim()
direnv_version()
on_git_branch()

Git

Tag your commit with the current poetry version plus the git revision, semver compatible.

version="v$(poetry version --short)-rev.$(git rev-parse --short HEAD)"
git tag -a "$version" -m "Release $version"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment