diff options
| -rw-r--r-- | alias | 2 | ||||
| -rwxr-xr-x | misc/otp | 12 | ||||
| -rwxr-xr-x | profile.sh | 2 |
3 files changed, 14 insertions, 2 deletions
| @@ -519,7 +519,7 @@ alias pe='pass edit' | |||
| 519 | alias pgn='pass generate --in-place --clip' | 519 | alias pgn='pass generate --in-place --clip' |
| 520 | alias pgc='pass generate --clip' | 520 | alias pgc='pass generate --clip' |
| 521 | words() { | 521 | words() { |
| 522 | cat /usr/share/dict/usa | egrep "^[a-z]{4,8}$" | shuf | head -40 | xargs -n${1:-2} | 522 | cat /usr/share/dict/usa | grep -E "^[a-z]{4,8}$" | shuf | head -40 | xargs -n${1:-2} |
| 523 | } | 523 | } |
| 524 | 524 | ||
| 525 | # Nginx | 525 | # Nginx |
diff --git a/misc/otp b/misc/otp new file mode 100755 index 0000000..ccdc1f3 --- /dev/null +++ b/misc/otp | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #! /usr/bin/bash | ||
| 2 | |||
| 3 | echo -n "OTP: " | ||
| 4 | read -r otp | ||
| 5 | |||
| 6 | if grep "^$otp$" /home/pham/.otp; then | ||
| 7 | TEMP=`mktemp` | ||
| 8 | sed "/^$otp$/ d" /home/pham/.otp >$TEMP | ||
| 9 | cat $TEMP > /home/pham/.otp | ||
| 10 | rm $TEMP | ||
| 11 | su pham | ||
| 12 | fi | ||
| @@ -76,6 +76,6 @@ fi | |||
| 76 | # Working DIR | 76 | # Working DIR |
| 77 | # [[ `pwd` == $HOME ]] && test -d ~/Downloads && cd ~/Downloads | 77 | # [[ `pwd` == $HOME ]] && test -d ~/Downloads && cd ~/Downloads |
| 78 | cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads | 78 | cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads |
| 79 | source ~/.profile | 79 | source ~/.profile 2>/dev/null |
| 80 | 80 | ||
| 81 | true | 81 | true |