Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 242:96f00cdb6614
Cert check function
author | Steve Huston <huston@astro.princeton.edu> |
---|---|
date | Fri, 01 Mar 2024 16:26:52 -0500 |
parents | 3d194431481b |
children | b00e6b403896 |
comparison
equal
deleted
inserted
replaced
241:c36986d268eb | 242:96f00cdb6614 |
---|---|
135 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ | 135 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ |
136 --proxy-server="socks5://127.0.0.1:$PROXY_PORT" \ | 136 --proxy-server="socks5://127.0.0.1:$PROXY_PORT" \ |
137 --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" \ | 137 --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" \ |
138 --user-data-dir="${PROXY_PATH}" > /dev/null 2>&1 | 138 --user-data-dir="${PROXY_PATH}" > /dev/null 2>&1 |
139 $PROXY_UMOUNT | 139 $PROXY_UMOUNT |
140 # Maybe leave this off, so what if the port is left open if there's no | 140 # Maybe leave this off, so what if the port is left open if there are no |
141 # conflicts... | 141 # conflicts... |
142 # ssh -O cancel -D $PROXY_PORT $PROXY_HOST | 142 # ssh -O cancel -D $PROXY_PORT $PROXY_HOST |
143 ) & | 143 ) & |
144 disown %+ | 144 disown %+ |
145 } | 145 } |
191 # Other | 191 # Other |
192 alias slurp="wget -r -l1 -np -nd -A.mp3" | 192 alias slurp="wget -r -l1 -np -nd -A.mp3" |
193 alias zulu="date -u +%Y%m%d%H%M%SZ" | 193 alias zulu="date -u +%Y%m%d%H%M%SZ" |
194 | 194 |
195 # Other Functions | 195 # Other Functions |
196 | |
197 certcheck() { | |
198 if [ -z "$1" ] ; then | |
199 echo "Usage: certcheck <hostname>[:port]" | |
200 echo " Defaults to port 443 if not specified." | |
201 return | |
202 fi | |
203 H=$1 | |
204 [[ $1 =~ :[0-9]+$ ]] || \ | |
205 H=$1":443" | |
206 echo -n Q | openssl s_client -connect $H | openssl x509 -noout -dates | |
207 } | |
196 | 208 |
197 mc-backup() { | 209 mc-backup() { |
198 pushd ~/Dropbox/Saves/minecraft/saves; | 210 pushd ~/Dropbox/Saves/minecraft/saves; |
199 if [ -d $1 ]; then | 211 if [ -d $1 ]; then |
200 tar cvf - $1 | bzip2 > ../$1_`date +%Y%m%d%H%M%S`.tar.bz2; | 212 tar cvf - $1 | bzip2 > ../$1_`date +%Y%m%d%H%M%S`.tar.bz2; |