From c2ec6e438c79a9280fce906e964dcf10a07a82d0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Aug 2011 01:19:58 +0200 Subject: added bassdrive --- streams/stream.db | 1 + 1 file changed, 1 insertion(+) diff --git a/streams/stream.db b/streams/stream.db index 168cc68d..484abaad 100644 --- a/streams/stream.db +++ b/streams/stream.db @@ -1,3 +1,4 @@ http://somafm.com/groovesalad.pls groove http://deepmix.ru/deepmix128.pls deepmix http://streams.xenim.de/radiotux.ogg radiotux +http://bassdrive.com/v2/streams/BassDrive.pls bassdrive -- cgit v1.2.3 From 212540303532a37ed24d79b13bce44ec763e4e44 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Aug 2011 01:22:19 +0200 Subject: cholerab ttycnser: initial commit --- cholerab/ttycnser | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 cholerab/ttycnser diff --git a/cholerab/ttycnser b/cholerab/ttycnser new file mode 100755 index 00000000..0972dbbb --- /dev/null +++ b/cholerab/ttycnser @@ -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 -- cgit v1.2.3 From f892f66a7ac44afc92234cb8185415afd70606d5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Aug 2011 02:10:00 +0200 Subject: added stream module for noise in /etc/sudoers you will need to add: noise ALL=(ALL) NOPASSWD: /krebs/streams/streams noise/modules/stream: is a sudo wrapper for streams/streams --- noise/modules/stream | 66 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/noise/modules/stream b/noise/modules/stream index 1e6fd0c5..476ffff9 100755 --- a/noise/modules/stream +++ b/noise/modules/stream @@ -1,64 +1,2 @@ -#! /bin/sh -inputdir=$HOME/noise/streams -basename="`basename "$0"`" -case "$1" in - (--help) - if echo "$0 $*" | grep -q '[[:space:]]--verbose\>'; then - echo -e "\x1B[35mtype \x1B[32m/$basename off \x1B[35mto turn stream off\x1B[m" - for i in `ls $inputdir` ; do - filename="$inputdir/$i" - shortcut=`xmlstarlet sel -t -v /station/@shortcut "$inputdir/$i"` - title=`xmlstarlet sel -t -v /station/@title "$inputdir/$i"` - topic=`xmlstarlet sel -t -v /station/@topic "$inputdir/$i"` - stream=`xmlstarlet sel -t -v /station/@stream "$inputdir/$i"` - echo -e "\x1B[35mtype \x1B[32m/$basename $shortcut \x1B[35mfor $topic\x1B[m" - done - else - echo "play an audio stream" - fi - ;; - (*) - exec 2>&1 - ffs='xml' - - if test -z "$*" ; then - echo -e "\x1B[32m/stream off \x1B[33m- turn stream off\x1B[m" - for i in `ls $inputdir` ; do - filename="$inputdir/$i" - shortcut=`xmlstarlet sel -t -v /station/@shortcut "$inputdir/$i"` - title=`xmlstarlet sel -t -v /station/@title "$inputdir/$i"` - topic=`xmlstarlet sel -t -v /station/@topic "$inputdir/$i"` - stream=`xmlstarlet sel -t -v /station/@stream "$inputdir/$i"` - echo -e "\x1B[32m/stream $shortcut \x1B[33m- $title \x1B[35m$topic\x1B[m" - done - else if [ "$1" = "off" ]; then - [ ! -d /tmp/noise ] || ( echo "no directory /tmp/noise; aborting" ; exit 1 ) - [ -f /tmp/noise/stream.pid ] && ( kill ` cat /tmp/noise/stream.pid ` ) - [ -e /tmp/noise/stream.pid ] && rm /tmp/noise/stream.pid || ( echo "can't remove /tmp/noise/stream.pid; aborting" ; exit 1 ) - else - for i in `ls $inputdir` ; do - filename="$inputdir/$i" - shortcut=`xmlstarlet sel -t -v /station/@shortcut "$inputdir/$i"` - stream=`xmlstarlet sel -t -v /station/@stream "$inputdir/$i"` - if [ "$shortcut" == "$1" ]; then - [ ! -d /tmp/noise ] || ( umask 077 ; mkdir /tmp/noise ) || ( echo "can't create /tmp/noise; aborting" ; exit 1 ) - [ -f /tmp/noise/stream.pid ] && ( kill ` cat /tmp/noise/stream.pid ` ) - [ -e /tmp/noise/stream.pid ] && rm /tmp/noise/stream.pid || ( echo "can't remove /tmp/noise/stream.pid; aborting" ; exit 1 ) - mplayer -cache 2048 -quiet "$stream" & - ( umask 077 ; echo $! > /tmp/noise/stream.pid ) - break - fi - done || cat< Date: Thu, 4 Aug 2011 02:32:37 +0200 Subject: added help for streams tool --- streams/streams | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/streams/streams b/streams/streams index a8408b4a..eb1e6674 100755 --- a/streams/streams +++ b/streams/streams @@ -2,6 +2,11 @@ HERE=$(dirname $(readlink -f $0)) URLS=`cat $HERE/stream.db` +#if [ ! `id -u` -eq "0" ]; then +# echo "we are going sudo..." +# exec sudo "$0" "$@" +#fi + function start() { # start the given stream von $1 REQ=$1 @@ -43,7 +48,23 @@ function list() } - +function shorthelp() +{ + echo "start|stop|restart|status|list [audio stream]" +} +function longhelp() +{ + B=`basename $0` + echo -n "Usage: $B " + shorthelp + echo " get all available streams with '/$B list' +Examples: + $B list + $B start groove + $B restart deepmix + $B status + $B stop" +} case "$1" in @@ -69,7 +90,10 @@ case "$1" in list) list ;; + (--help) + shorthelp + ;; *) - echo "aidsballs" + longhelp ;; esac -- cgit v1.2.3 From fc6542e9083de4a574aa08221bd8907ad30c19f8 Mon Sep 17 00:00:00 2001 From: club-mate Date: Thu, 4 Aug 2011 16:24:51 +0200 Subject: streams: add illstreet --- streams/stream.db | 1 + 1 file changed, 1 insertion(+) diff --git a/streams/stream.db b/streams/stream.db index 484abaad..6ca9a627 100644 --- a/streams/stream.db +++ b/streams/stream.db @@ -2,3 +2,4 @@ http://somafm.com/groovesalad.pls groove http://deepmix.ru/deepmix128.pls deepmix http://streams.xenim.de/radiotux.ogg radiotux http://bassdrive.com/v2/streams/BassDrive.pls bassdrive +http://somafm.com/illstreet.pls illstreet -- cgit v1.2.3 From bb394845aa08007d3c947ff0ef50e84badefd903 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Aug 2011 16:42:02 +0200 Subject: host arch getsize: initial vomit --- host/dist/arch/getsize | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 host/dist/arch/getsize diff --git a/host/dist/arch/getsize b/host/dist/arch/getsize new file mode 100755 index 00000000..d099c9e2 --- /dev/null +++ b/host/dist/arch/getsize @@ -0,0 +1,17 @@ +#! /bin/sh +set -euf +sed -rn ' + /^Name/{ + s/^Name *: *(.*)$/\1/ + T + h + } + /^Installed Size/{ + s/^Installed Size *: *(.*)$/ \1/ + T + H + x + s/\n//g + p + } +' | awk '{print$2$3" "$1}' | sort -n -- cgit v1.2.3