aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-30 15:36:05 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-30 15:36:05 +0800
commit7df5e5e9041c11c18d5bd54983a9c21a3864fadb (patch)
tree3bfeb85ed8db17e1c5ce764d1059141eab10da42
parent7b03670b21e0feaaf5db6b9dec23f314b9601e13 (diff)
Update
-rw-r--r--alias2
-rwxr-xr-xmisc/otp12
-rwxr-xr-xprofile.sh2
3 files changed, 14 insertions, 2 deletions
diff --git a/alias b/alias
index 7b1825f..05e979f 100644
--- a/alias
+++ b/alias
@@ -519,7 +519,7 @@ alias pe='pass edit'
519alias pgn='pass generate --in-place --clip' 519alias pgn='pass generate --in-place --clip'
520alias pgc='pass generate --clip' 520alias pgc='pass generate --clip'
521words() { 521words() {
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
3echo -n "OTP: "
4read -r otp
5
6if 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
12fi
diff --git a/profile.sh b/profile.sh
index b426e95..e689376 100755
--- a/profile.sh
+++ b/profile.sh
@@ -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
78cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads 78cd ~/git/dumbymap 2>/dev/null || cd ~/Downloads
79source ~/.profile 79source ~/.profile 2>/dev/null
80 80
81true 81true