X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=bashrc;h=178504ec8ce9b7254693a5b5a015b94f9906c1a6;hp=b7e32623b0486be8937e493793b79c931f936043;hb=784249066ea9199db8b8a31778decc8738c7ef51;hpb=7d0d106afa93fa5dba16c59fad371c94e0f55af3 diff --git a/bashrc b/bashrc index b7e3262..178504e 100644 --- a/bashrc +++ b/bashrc @@ -238,6 +238,13 @@ function bak () { done } +# Password generator + +function pwgen () { + tr -dc A-Za-z0-9 < /dev/urandom | head -c16 + echo +} + function ua () { [[ "$1" ]] || ( echo "Universal unarchive: ua [ ...]" >&2 && return 1) @@ -616,7 +623,7 @@ alias ripcd=abcde function mksmall () { - PARAMS="-geometry 800x600" + [[ "${PARAMS}" ]] || PARAMS="-geometry 800x600" # Auto-orient does not seem to work at all, hence the ugly hack # with exif below