Skip to content

Commit 4dbd8a6

Browse files
committed
use pure shell impl of prpg, document git sww --all
1 parent a19ae9e commit 4dbd8a6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.bashrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ alias hist="history|tail"
2929
alias psa="ps auxwww"
3030
alias cdate="date '+%Y%m%d%H%M%S'"
3131

32-
# random password generator
33-
rpg(){
34-
size=${1:-16}; ruby -e "require 'securerandom'; puts SecureRandom.urlsafe_base64($size);"
32+
# psuedo-random, insecure password generator
33+
prpg() {
34+
echo -n $RANDOM | openssl sha1 -binary | base64 | tr -d '/+=' | | cut -c-16
3535
}
3636

3737
reset_known_host() {

.githelpers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ reset_wildcard(){
9494
}
9595

9696
# Accepts a pattern and switches to the first branch that matches it.
97+
# Provide the `--all` flag to include remote branches as well.
9798
switch_wildcard() {
9899
local all_branches=false
99100
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do case $1 in

0 commit comments

Comments
 (0)