-
Notifications
You must be signed in to change notification settings - Fork 30
Bash Snippet Manager
Linwei edited this page Mar 8, 2020
·
8 revisions
Have difficulty in remembering long commands ? frustrated in repetitive commands ??
asynctask.py
would also be useful when you need a bash snippets manager:
Save to following content in ~/.config/asynctask/tasks.ini
:
[git-push-master]
command=git push origin master
[git-pull-master]
command=git pull origin master
[git-fetch-master]
command=git fetch origin master
[git-checkout]
command=git checkout $(?branch)
[git-proxy-on]
command=git config --global http.proxy "socks5://localhost:1080" && git config --global https.proxy "socks5://localhost:1080"
[git-proxy-off]
command=git config --global --unset http.proxy && git config --global --unset https.proxy
[git-status]
command=git status
[git-log]
command=tig
[misc-supervisor-reload]
command=sudo supervisorctl reload
[misc-weather]
command=curl -s wttr.in/?n0
[misc-benchmark-cpu]
command=python -c "import test.pystone;print(test.pystone.pystones(500000))"
[misc-benchmark-mem]
command=dd if=/dev/zero of=/dev/null bs=1M count=32768
[misc-disk-usage]
command=df -h
[misc-system-info]
command=neofetch
[misc-create-qr-code]
command=echo '$(?content)' | curl -F-=\<- qrenco.de
[net-check-port]
command=sudo lsof -i :$(?port)
[net-host-ip]
command=hostname --all-ip-addresses | tr " " "\n" | grep -v "0.0.0.0" | grep -v "127.0.0.1"
command/darwin=ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'
[net-start-http]
command=python -m SimpleHTTPServer $(?port)
[net-whois-domain]
command=/usr/bin/whois -h whois.internic.net $(?domain) | sed '/NOTICE:/q'
[ssh-qn1]
command=ssh qn1.skywind.me
[ssh-11]
command=ssh 192.168.1.11
[ssh-10]
command=ssh 192.168.1.10
[ssh-12]
command=ssh 192.168.1.12
[ssh-3]
command=ssh 192.168.1.3