From 4aa57f98c722c948e3bc4404ed0887e8b8108aec Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 29 Jan 2018 15:21:59 +0100 Subject: [PATCH] Add alias to calculate bcrypt hashes Signed-off-by: Knut Ahlers --- .zsh/config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/config.sh b/.zsh/config.sh index 32ec8cc..6f5f624 100644 --- a/.zsh/config.sh +++ b/.zsh/config.sh @@ -33,6 +33,7 @@ bindkey '^[[1;5D' backward-word ## Aliases alias alpine='docker run --rm -ti alpine /bin/sh' +alias bcrypt='python3 -c "import bcrypt; import sys; print(bcrypt.hashpw(sys.argv[1].encode(\"utf-8\"), bcrypt.gensalt(10)).decode(\"utf-8\"))"' alias gometalinter='gometalinter --enable-all -D aligncheck -D errcheck -D lll --cyclo-over=15 -e bindata.go --vendor' alias htpasswd='python3 -c "import crypt; import sys; print(crypt.crypt(sys.argv[1], crypt.mksalt(crypt.METHOD_SHA512)));"' alias mysql='docker run --rm -ti -v $(pwd):$(pwd) -w $(pwd) mysql bash'