configfiles/zsh/.zsh/10-helpers.zsh

27 lines
524 B
Bash
Raw Normal View History

2015-10-08 14:31:40 +02:00
mkpasswd() {
LEN=${1:-30}
tr -cd ' -~' < /dev/urandom | fold -w $LEN | sed 1q
}
2015-10-13 18:09:25 +02:00
mkpasswd2() {
LEN=${1:-30}
base64 < /dev/urandom | fold -w $LEN | sed 1q
}
2015-11-01 23:54:33 +01:00
gitall() {
ROOT=$(pwd)
find . -name '.git' | while read repo; do
repodir=$(dirname "$repo")
reponame=$(basename "$repodir")
cd "$repodir"
echo "==================================="
echo "===> $reponame"
echo "==================================="
git $@
cd "$ROOT";
done
}