URI:
       tcleanups; optimizations; features - scripts - random scripts
  HTML git clone git://parazyd.org/scripts.git
   DIR Log
   DIR Files
   DIR Refs
       ---
   DIR commit 1ee8c4a1d369f939220e027476c5ff79433e3038
   DIR parent 8876e7a9c246048415eb7c4025150728579c59f5
  HTML Author: parazyd <parazyd@dyne.org>
       Date:   Wed, 15 Feb 2017 12:57:29 +0100
       
       cleanups; optimizations; features
       
       Diffstat:
         A catfact                             |       3 +++
         M extmon                              |       3 ++-
         M minimpc                             |      12 ++++++------
         R cuesplit.sh -> notinpath/cuesplit.… |       0 
         R fbits -> notinpath/fbits            |       0 
         R interjection.sh -> notinpath/inter… |       0 
         R addrepo.sh -> obsolete/addrepo.sh   |       0 
         R blink.sh -> obsolete/blink.sh       |       0 
         R catfact.py -> obsolete/catfact.py   |       0 
         R disco -> obsolete/disco             |       0 
         R mycosmos -> obsolete/mycosmos       |       0 
         R pio -> obsolete/pio                 |       0 
         R powertoptune.sh -> obsolete/powert… |       0 
         R signrelease -> obsolete/signrelease |       0 
         R weepop.sh -> obsolete/weepop.sh     |       0 
         R xkcd.py -> obsolete/xkcd.py         |       0 
         M sslget                              |      15 ++++++++++++++-
         M touchpad-toggle                     |       2 +-
         A xkcd                                |       6 ++++++
       
       19 files changed, 32 insertions(+), 9 deletions(-)
       ---
   DIR diff --git a/catfact b/catfact
       t@@ -0,0 +1,3 @@
       +#!/bin/sh
       +
       +curl -s http://catfacts-api.appspot.com/api/facts | jq -r '.facts[]'
   DIR diff --git a/extmon b/extmon
       t@@ -3,7 +3,7 @@
        # parazyd - (c) wtfpl 2016
        # skreenz
        
       -IN="LVDS1"
       + IN="${IN:-LVDS1}"
        EXT="${EXT:-VGA1}"
        
        
       t@@ -30,5 +30,6 @@ case "$1" in
                        ;;
                *)
                        printf "%s {left|right|above|dup|off|list}\\n" "$(basename $0)"
       +                printf "overridable env vars: IN, EXT\\n"
                        ;;
        esac
   DIR diff --git a/minimpc b/minimpc
       t@@ -14,30 +14,30 @@ fi
        
        toggle() {
                playing() {
       -                echo status | nc $NCARGS $MPDHOST | grep "^state: play$"
       +                echo status | busybox nc $NCARGS $MPDHOST | grep "^state: play$"
                }
        
                play() {
       -                echo play | nc $NCARGS $MPDHOST > /dev/null
       +                echo play | busybox nc $NCARGS $MPDHOST > /dev/null
                }
        
                pause() {
       -                echo pause | nc $NCARGS $MPDHOST > /dev/null
       +                echo pause | busybox nc $NCARGS $MPDHOST > /dev/null
                }
        
                test -z "$(playing)" && play || pause
        }
        
        next() {
       -        echo next | nc $NCARGS $MPDHOST $MPDPORT > /dev/null
       +        echo next | busybox nc $NCARGS $MPDHOST $MPDPORT > /dev/null
        }
        
        prev() {
       -        echo prev | nc $NCARGS $MPDHOST $MPDPORT > /dev/null
       +        echo prev | busybox nc $NCARGS $MPDHOST $MPDPORT > /dev/null
        }
        
        stop() {
       -        echo stop | nc $NCARGS $MPDHOST $MPDPORT > /dev/null
       +        echo stop | busybox nc $NCARGS $MPDHOST $MPDPORT > /dev/null
        }
        
        case "$1" in
   DIR diff --git a/cuesplit.sh b/notinpath/cuesplit.sh
   DIR diff --git a/fbits b/notinpath/fbits
   DIR diff --git a/interjection.sh b/notinpath/interjection.sh
   DIR diff --git a/addrepo.sh b/obsolete/addrepo.sh
   DIR diff --git a/blink.sh b/obsolete/blink.sh
   DIR diff --git a/catfact.py b/obsolete/catfact.py
   DIR diff --git a/disco b/obsolete/disco
   DIR diff --git a/mycosmos b/obsolete/mycosmos
   DIR diff --git a/pio b/obsolete/pio
   DIR diff --git a/powertoptune.sh b/obsolete/powertoptune.sh
   DIR diff --git a/signrelease b/obsolete/signrelease
   DIR diff --git a/weepop.sh b/obsolete/weepop.sh
   DIR diff --git a/xkcd.py b/obsolete/xkcd.py
   DIR diff --git a/sslget b/sslget
       t@@ -4,4 +4,17 @@
        # it assumes 443 to be the default SSL port
        
        portnum=${2-443}
       -echo | openssl s_client -connect $1:$portnum 2>&1| sed '/BEGIN CERT/,/END CERT/p;d'
       +cert="$(echo | openssl s_client -connect $1:$portnum 2>&1 | sed '/BEGIN CERT/,/END CERT/p;d')"
       +
       +shift
       +
       +printf "%s\n" "$cert"
       +
       +case "$2" in
       +        -fpr*)
       +                printf "\n"
       +                printf "%s\n" "$cert" | openssl x509 -noout -fingerprint -sha256
       +                printf "%s\n" "$cert" | openssl x509 -noout -fingerprint -sha1
       +                printf "%s\n" "$cert" | openssl x509 -noout -fingerprint -md5
       +                ;;
       +esac
   DIR diff --git a/touchpad-toggle b/touchpad-toggle
       t@@ -1,6 +1,6 @@
        #!/bin/sh
        
       -if [ $(synclient -l | grep TouchpadOff | gawk -F '= ' '{ print $2 }') -eq 0 ];
       +if [ $(synclient -l | grep TouchpadOff | mawk -F '= ' '{ print $2 }') -eq 0 ];
        then
                synclient TouchpadOff=1
        else
   DIR diff --git a/xkcd b/xkcd
       t@@ -0,0 +1,6 @@
       +#!/bin/sh
       +
       +tot="$(curl -s https://xkcd.com/info.0.json | jq '.num')"
       +rnd="$(shuf -i 1-${tot} -n 1)"
       +
       +curl -s https://xkcd.com/$rnd/info.0.json | jq '.img' | xargs feh