From f570fd0f8afa0fe127eec61ae08a9a6499fbf649 Mon Sep 17 00:00:00 2001 From: maudin Date: Thu, 2 Jul 2020 15:36:29 +0200 Subject: [PATCH] add ips script to detect public ips --- hybris.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/hybris.zsh b/hybris.zsh index f855146..1d9d651 100644 --- a/hybris.zsh +++ b/hybris.zsh @@ -20,6 +20,7 @@ dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip} dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1} e() {emacsclient -n $@ > /dev/null 2>&1} fd() {fdfind -H -I -L $@} +ips() {i=0; while [ $i -lt 10 ]; do curl -s ipinfo.io | jq '.ip'; i=$(($i + 1)); done | sort | uniq -c} j() {if [ $# -eq 0 ]; then marks; else jump $@; fi} loop() {while [ 1 ]; do sh -c "$@"; done} open_ports() {if [ $# -eq 1 ] && [ $1 = "public" ]; then sudo netstat -tulpen 2> /dev/null | grep "LISTEN" | grep -v "127.0.0.1"; else sudo netstat -tulpen 2> /dev/null | grep "LISTEN"; fi}