Minor fixes

This commit is contained in:
2019-06-13 14:02:14 +05:30
committed by GitHub
parent d6f0af204f
commit f02cc7c241
+8 -4
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Open space separated list of ssh logins in separate tabs ( using gnome-terminal )
sshInTabs(){ sshInTabs(){
logins="$@" logins="$@"
for i in $logins; do for i in $logins; do
@@ -8,19 +8,20 @@ sshInTabs(){
done done
} }
# Edit this file
edit(){ edit(){
vim ~/.local/Apps/daily-utils/bin/hari-tools.sh vim ~/.local/bin/hari-tools.sh
} }
## Convert text to wav ## Convert text to wav
genSound(){ echo $1 | espeak --stdout | ffmpeg -i - -ar 8000 -y $2.wav ; } genSound(){ echo $1 | espeak --stdout | ffmpeg -i - -ar 8000 -y $2.wav ; }
# Clear sysrq keys which messing up with Window manager after switching to "raw mode"
clearSysRq(){ clearSysRq(){
sudo kbd_mode -s -C /dev/tty7 sudo kbd_mode -s -C /dev/tty7
} }
# Show my public IP
myIp(){ myIp(){
curl 'https://api.ipify.org?format=json' curl 'https://api.ipify.org?format=json'
} }
@@ -34,6 +35,9 @@ block_dev_to_vmdk(){
# Print sha256 fignerprint of ssh public keys # Print sha256 fignerprint of ssh public keys
sshsha256(){ awk '{print $2}' $1 | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 ; } sshsha256(){ awk '{print $2}' $1 | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 ; }
# Print all available commands if none was provided in commandline
cmd=$1 cmd=$1
shift shift
allFunctions=$(typeset -F | cut -d ' ' -f 3 | grep -v '^_' | tr '\n' ' ' ) allFunctions=$(typeset -F | cut -d ' ' -f 3 | grep -v '^_' | tr '\n' ' ' )