From 8d28356113c47ad304d28d144c0e9757714617c9 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 22 Jan 2018 20:46:27 +0100 Subject: [PATCH] Add alias to encrypt passwords for htpasswd file 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 e00abc1..32ec8cc 100644 --- a/.zsh/config.sh +++ b/.zsh/config.sh @@ -34,6 +34,7 @@ bindkey '^[[1;5D' backward-word ## Aliases alias alpine='docker run --rm -ti alpine /bin/sh' 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' alias :q='exit' alias share='AWS_REGION=us-east-1 vault2env --key=secret/aws/private -- share --bucket=share-luzifer-io-s3bucket-164ztrtyq1f35 --base-path="file/{{ printf \"%.6s\" .Hash}}" --base-url="https://knut.cc/#"'