From 2a3e35311f7fba03e0d553cc8d5dc7a61acd356e Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 25 May 2013 15:59:24 +0200 Subject: add webhoster (krebsco.de) into repo --- cholerab/max_dirty_hack.sh | 102 --------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100755 cholerab/max_dirty_hack.sh (limited to 'cholerab') diff --git a/cholerab/max_dirty_hack.sh b/cholerab/max_dirty_hack.sh deleted file mode 100755 index 7183a760..00000000 --- a/cholerab/max_dirty_hack.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -stty -echo cbreak -ofdel -x_max=90 -y_max=10 -x_cur=1 -y_cur=1 -y= -t=1 -outputfile=/tmp/cholerab_out -inputfile=/tmp/cholerab_in -echo -n "c" - -while [ $t -lt $(( y_max+2 )) ];do - echo -e "[$t;$(( x_max+1 ))Hx" - t=$(( t+1 )) -done -t=1 -while [ $t -lt $(( x_max+2 )) ];do - echo -e "[$(( y_max+1 ));${t}Hx" - t=$(( t+1 )) -done - -echo -n "[$y_cur;${x_cur}H" -#Main Loop -while x="`dd bs=1 count=1 2>/dev/null`"; do - y="$y$x" - case "$y" in - (*"") - if [[ $y_cur -le 1 ]];then - y_cur=$y_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - y_cur=$(( y_cur-1 )) - fi - y= - ;; - (*"") - if [[ $y_cur -ge $y_max ]];then - y_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - y_cur=$(( y_cur+1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -ge $x_max ]];then - x_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - x_cur=$(( x_cur+1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -le 1 ]];then - x_cur=$x_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - x_cur=$(( x_cur-1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -le 1 ]];then - x_cur=$x_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n " " - x_cur=$(( x_cur-1 )) - fi - y= - ;; - (|\[) - : - ;; - (*) - if [[ $x_cur -ge $x_max ]];then - x_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "$x" - echo "<0 $x $x_cur $y_cur>" >> $outputfile - x_cur=$(( x_cur+1 )) - fi - y= - ;; - esac - while [[ -s $inputfile ]]; do - cat $inputfile | head -n 1 | sed 's,[<>],,g' | { read MODE CHAR XN YN ; echo -n "7[$YN;${XN}H$CHAR8"; } - sed -i -e "1d" $inputfile - done - - state=`echo -n "$x" | od -An -tx | tr -d "[$IFS]"` - echo -n "7[1;$(( x_max+2 ))H$state8" - echo -n "7[2;$(( x_max+2 ))H 8" - echo -n "7[2;$(( x_max+2 ))H$x_cur:$y_cur8" -done -- cgit v1.2.3 From 63b507a98725314ede0447e2675e3867384a8123 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 25 May 2013 16:05:18 +0200 Subject: cleanup --- cholerab/live.sh | 88 -------------------------------------------- cholerab/too_old/live.sh | 88 ++++++++++++++++++++++++++++++++++++++++++++ cholerab/too_old/ttycnser.sh | 27 ++++++++++++++ cholerab/ttycnser.sh | 27 -------------- 4 files changed, 115 insertions(+), 115 deletions(-) delete mode 100755 cholerab/live.sh create mode 100755 cholerab/too_old/live.sh create mode 100755 cholerab/too_old/ttycnser.sh delete mode 100755 cholerab/ttycnser.sh (limited to 'cholerab') diff --git a/cholerab/live.sh b/cholerab/live.sh deleted file mode 100755 index 62a2c3cf..00000000 --- a/cholerab/live.sh +++ /dev/null @@ -1,88 +0,0 @@ -#! /bin/sh -set -euf -stty cbreak -echo - -go() { - state=$1 - wr 7 - wr " " >&2 - wr "state=$state" >&2 - wr 8 - $1 -} - -rd() { - dd bs=1 count=1 2>/dev/null -} - -bufrd() { - buf="`rd`" - bufinfowr -} - -bufrda() { - buf="$buf`rd`" - bufinfowr -} - -bufinfowr() { - wr 7 - wr " " >&2 - wr " " >&2 - case "$buf" in - () wr '^[' >&2;; - (*) wr "$buf" >&2;; - esac - wr "`wr "$buf" | xxd -p`" >&2 - wr 8 -} - -wr() { - echo -n "$1" -} - -C0="`echo C0 | xxd -r -p`"; DF="`echo DF | xxd -r -p`" -E0="`echo E0 | xxd -r -p`"; EF="`echo EF | xxd -r -p`" -F0="`echo F0 | xxd -r -p`"; F7="`echo F7 | xxd -r -p`" -S() { - bufrd - case "$buf" in - () go ESC;; - () wr ' '; go S;; - ([$C0-$DF]) go U1;; - ([$E0-$EF]) go U2;; - ([$F0-$F7]) go U3;; - (*) wr "$buf"; go S;; - esac -} - -U1() { buf="$buf`rd`"; wr "$buf"; go S; } -U2() { buf="$buf`rd`"; go U1; } -U3() { buf="$buf`rd`"; go U2; } - - -ESC() { - bufrda - case "$buf" in - ('[') go ESC_OSQRB;; - (*) - wr '^[' - go S - ;; - esac -} - -ESC_OSQRB() { - bufrda - case "$buf" in - (''|''|''|'') wr "$buf"; go S;; - (*) - wr '^[[' - go S - ;; - esac -} - - -wr 'c' -go S diff --git a/cholerab/too_old/live.sh b/cholerab/too_old/live.sh new file mode 100755 index 00000000..62a2c3cf --- /dev/null +++ b/cholerab/too_old/live.sh @@ -0,0 +1,88 @@ +#! /bin/sh +set -euf +stty cbreak -echo + +go() { + state=$1 + wr 7 + wr " " >&2 + wr "state=$state" >&2 + wr 8 + $1 +} + +rd() { + dd bs=1 count=1 2>/dev/null +} + +bufrd() { + buf="`rd`" + bufinfowr +} + +bufrda() { + buf="$buf`rd`" + bufinfowr +} + +bufinfowr() { + wr 7 + wr " " >&2 + wr " " >&2 + case "$buf" in + () wr '^[' >&2;; + (*) wr "$buf" >&2;; + esac + wr "`wr "$buf" | xxd -p`" >&2 + wr 8 +} + +wr() { + echo -n "$1" +} + +C0="`echo C0 | xxd -r -p`"; DF="`echo DF | xxd -r -p`" +E0="`echo E0 | xxd -r -p`"; EF="`echo EF | xxd -r -p`" +F0="`echo F0 | xxd -r -p`"; F7="`echo F7 | xxd -r -p`" +S() { + bufrd + case "$buf" in + () go ESC;; + () wr ' '; go S;; + ([$C0-$DF]) go U1;; + ([$E0-$EF]) go U2;; + ([$F0-$F7]) go U3;; + (*) wr "$buf"; go S;; + esac +} + +U1() { buf="$buf`rd`"; wr "$buf"; go S; } +U2() { buf="$buf`rd`"; go U1; } +U3() { buf="$buf`rd`"; go U2; } + + +ESC() { + bufrda + case "$buf" in + ('[') go ESC_OSQRB;; + (*) + wr '^[' + go S + ;; + esac +} + +ESC_OSQRB() { + bufrda + case "$buf" in + (''|''|''|'') wr "$buf"; go S;; + (*) + wr '^[[' + go S + ;; + esac +} + + +wr 'c' +go S diff --git a/cholerab/too_old/ttycnser.sh b/cholerab/too_old/ttycnser.sh new file mode 100755 index 00000000..0972dbbb --- /dev/null +++ b/cholerab/too_old/ttycnser.sh @@ -0,0 +1,27 @@ +#! /bin/sh +set -euf + +tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" + +case "${mode-server}" in + (server) + host=0.0.0.0 + port=8080 + export mode=client + echo "ttycnser @ $host $port" >&2 + exec tcpserver $host $port "$0" + ;; + (client) + line="`read line && echo "$line"`" + echo -n '7>>>> '"$line"'8' > "$tty" + ;; + (install) + # TODO tell the user to do something like + # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" + echo "ln -snf '`tty`' '$tty'" + ;; + (*) + echo 'Error 1: You are made of stupid!' >&2 + exit 23 + ;; +esac diff --git a/cholerab/ttycnser.sh b/cholerab/ttycnser.sh deleted file mode 100755 index 0972dbbb..00000000 --- a/cholerab/ttycnser.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -set -euf - -tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" - -case "${mode-server}" in - (server) - host=0.0.0.0 - port=8080 - export mode=client - echo "ttycnser @ $host $port" >&2 - exec tcpserver $host $port "$0" - ;; - (client) - line="`read line && echo "$line"`" - echo -n '7>>>> '"$line"'8' > "$tty" - ;; - (install) - # TODO tell the user to do something like - # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" - echo "ln -snf '`tty`' '$tty'" - ;; - (*) - echo 'Error 1: You are made of stupid!' >&2 - exit 23 - ;; -esac -- cgit v1.2.3 From a653b947f5238267201e155005b603664a39d0e8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 Jun 2013 18:57:25 +0200 Subject: added autowifi script --- cholerab/bling/krebs-v3_small.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cholerab/bling/krebs-v3_small.txt (limited to 'cholerab') diff --git a/cholerab/bling/krebs-v3_small.txt b/cholerab/bling/krebs-v3_small.txt new file mode 100644 index 00000000..8adce7eb --- /dev/null +++ b/cholerab/bling/krebs-v3_small.txt @@ -0,0 +1,10 @@ +x x x x +x x x x +xx xx + x x x x + x x x x +xxxxxxxxxx + xxxxxxxx +x xxxxxx x +x x x x x +x x xx x x -- cgit v1.2.3