summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreuer <root@euer.krebsco.de>2012-12-20 03:19:28 +0100
committereuer <root@euer.krebsco.de>2012-12-20 03:19:28 +0100
commit38dbb8ee3867060fddd427d1bb4e57ee0300c8bb (patch)
treeabb7b2ab988934d6ddfbdd0448517b3a957645bf
parent7c1b02b086a8377ad76a46c277a224150c5b85d6 (diff)
parent09dc57b9d5f564d13f80707eefadd845a4aa9aec (diff)
Merge branch 'master' of github.com:krebscode/painload
-rw-r--r--assets/doc/ass.txt (renamed from cholerab/assets/ass.txt)0
-rw-r--r--assets/doc/lexikon.txt (renamed from cholerab/assets/lexikon.txt)0
-rw-r--r--assets/doc/structs.nojson (renamed from cholerab/assets/structs.nojson)0
-rw-r--r--assets/doc/usecases.txt (renamed from cholerab/assets/usecases.txt)0
-rw-r--r--evan/Makefile9
-rw-r--r--god/claws/.gitignore (renamed from claws/.gitignore)0
-rw-r--r--god/claws/Makefile (renamed from claws/Makefile)0
-rw-r--r--god/claws/README.md12
-rw-r--r--god/claws/communication.h (renamed from claws/communication.h)0
-rw-r--r--god/claws/rcontrol.c (renamed from claws/rcontrol.c)0
-rw-r--r--god/streams/.gitignore1
-rw-r--r--god/streams/Makefile (renamed from streams/Makefile)6
-rw-r--r--god/streams/README.md38
-rw-r--r--god/streams/bin/helper/streamfind10
-rw-r--r--god/streams/bin/helper/streamwrite6
-rwxr-xr-xgod/streams/bin/mpdstreams (renamed from streams/mpdstreams)3
-rwxr-xr-xgod/streams/bin/relaxxapi.py (renamed from streams/relaxxapi.py)0
-rwxr-xr-xgod/streams/bin/relaxxstreams (renamed from streams/relaxxstreams)4
-rwxr-xr-xgod/streams/bin/stream-starter (renamed from streams/stream-starter)0
-rwxr-xr-x[-rw-r--r--]god/streams/bin/streams (renamed from streams/streams.py)2
-rw-r--r--god/streams/db/direct.db78
-rw-r--r--god/streams/db/stream.db (renamed from streams/stream.db)4
-rw-r--r--god/streams/doc/relaxxplayer.api (renamed from streams/relaxxplayer.api)2
-rw-r--r--god/twinter/init_stripped.py10
-rw-r--r--ivan/Makefile7
-rwxr-xr-xivan/ivan (renamed from evan/evan)2
-rwxr-xr-xivan/ivan-startup (renamed from evan/evan-startup)0
-rw-r--r--ivan/satz-liste (renamed from evan/satz-liste)0
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh1
-rw-r--r--sandbox/DNA/README.md (renamed from DNA/README.md)0
-rw-r--r--sandbox/DNA/linux/LICENSE (renamed from DNA/linux/LICENSE)0
-rw-r--r--sandbox/DNA/linux/Makefile (renamed from DNA/linux/Makefile)0
-rw-r--r--sandbox/DNA/linux/README.md (renamed from DNA/linux/README.md)0
-rw-r--r--sandbox/DNA/linux/TODO (renamed from DNA/linux/TODO)0
-rw-r--r--sandbox/DNA/linux/krebs.c (renamed from DNA/linux/krebs.c)0
-rw-r--r--sandbox/README.md5
-rw-r--r--sandbox/cobra/README.md (renamed from cobra/README)31
-rw-r--r--sandbox/cobra/hello/index.sh (renamed from cobra/hello/index.sh)0
-rwxr-xr-xsandbox/cobra/index.sh (renamed from cobra/index.sh)0
-rw-r--r--streams/README10
-rwxr-xr-xstreams/streams131
41 files changed, 189 insertions, 183 deletions
diff --git a/cholerab/assets/ass.txt b/assets/doc/ass.txt
index f10d2ba1..f10d2ba1 100644
--- a/cholerab/assets/ass.txt
+++ b/assets/doc/ass.txt
diff --git a/cholerab/assets/lexikon.txt b/assets/doc/lexikon.txt
index 0d362100..0d362100 100644
--- a/cholerab/assets/lexikon.txt
+++ b/assets/doc/lexikon.txt
diff --git a/cholerab/assets/structs.nojson b/assets/doc/structs.nojson
index 4c084862..4c084862 100644
--- a/cholerab/assets/structs.nojson
+++ b/assets/doc/structs.nojson
diff --git a/cholerab/assets/usecases.txt b/assets/doc/usecases.txt
index a3e2a4fa..a3e2a4fa 100644
--- a/cholerab/assets/usecases.txt
+++ b/assets/doc/usecases.txt
diff --git a/evan/Makefile b/evan/Makefile
deleted file mode 100644
index f87e8505..00000000
--- a/evan/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-.PHONY: infect
-INSTALL_DIR = /root/bin
-infect:
- mkdir -p ${INSTALL_DIR}
- cp evan ${INSTALL_DIR}
- cp satz-liste ${INSTALL_DIR}
- cp evan-startup /etc/init.d/evan
- update-rc.d evan start
-
diff --git a/claws/.gitignore b/god/claws/.gitignore
index 5da5924f..5da5924f 100644
--- a/claws/.gitignore
+++ b/god/claws/.gitignore
diff --git a/claws/Makefile b/god/claws/Makefile
index abfae5eb..abfae5eb 100644
--- a/claws/Makefile
+++ b/god/claws/Makefile
diff --git a/god/claws/README.md b/god/claws/README.md
new file mode 100644
index 00000000..00c90a85
--- /dev/null
+++ b/god/claws/README.md
@@ -0,0 +1,12 @@
+# CLAWS
+
+Claws is a tool to manage some obscure Hardware Relay Board currently attached
+to the krebs infrastructure
+
+# Installation
+
+ make install
+
+# Usage
+
+ rcontrol --help
diff --git a/claws/communication.h b/god/claws/communication.h
index db4b2c36..db4b2c36 100644
--- a/claws/communication.h
+++ b/god/claws/communication.h
diff --git a/claws/rcontrol.c b/god/claws/rcontrol.c
index 972c97d0..972c97d0 100644
--- a/claws/rcontrol.c
+++ b/god/claws/rcontrol.c
diff --git a/god/streams/.gitignore b/god/streams/.gitignore
new file mode 100644
index 00000000..0d20b648
--- /dev/null
+++ b/god/streams/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/streams/Makefile b/god/streams/Makefile
index ab5d1429..2d0056f4 100644
--- a/streams/Makefile
+++ b/god/streams/Makefile
@@ -4,10 +4,10 @@ streams = $(shell cut -d\ -f2 stream.db)
CURRDIR = ${PWD}
.PHONY: all $(streams)
-local: ../bin/streams
+local: ../../bin/streams
-../bin/streams:
- ln -sf $$PWD/streams ../bin/streams
+../../bin/streams:
+ ln -sf $$PWD/bin/streams ../../bin/streams
all: $(streams)
@update-rc.d groove defaults 2>/dev/null || echo "** put groove daemon in DAEMONS in /etc/rc.conf"
diff --git a/god/streams/README.md b/god/streams/README.md
new file mode 100644
index 00000000..cc763ede
--- /dev/null
+++ b/god/streams/README.md
@@ -0,0 +1,38 @@
+# streams done right(tm)
+
+There are numerous ways to start streams ( make your computer or some server
+output streamed audio). Currently implemented are:
+
+# Streams Modules
+1. pure streams - will start mpd on your local machine
+2. mpdstreams - will use a given mpd server to start a stream
+3. relaxxstreams - will contact the relaxxplayer (mpd front-end) if the direct
+ connection to the mpd is prohibited by firewall rules
+# Database
+Currently there are a number of possible streams saved in the database files
+which contain of a link, a space, and the name of the stream. the database
+can be found in db/ .
+
+Currently there are two kinds of databases:
+1. streams.db - contains links to playlists of streams
+2. direct.db - contains links directly to the stream, not the playlist
+
+to generate direct.db from a list of playlists use the helper/* scripts
+
+# initscripts
+
+the most convenient way to start streams is to use stream-starter which is
+a script which, when symlinked with a name of a stream, invokes the streams
+tool with its own name as parameter.
+
+An example:
+
+ ln -s /krebs/god/streams/bin/stream-starter /etc/init.d/groove
+ /etc/init.d/groove start
+
+# Remarks
+deepmix,groovesalad and radiotux are now init.d scrips which can be
+started and stopped.
+
+scripts are dumped into /etc/init.d and groovesalad will be set as
+default via update-rc.d
diff --git a/god/streams/bin/helper/streamfind b/god/streams/bin/helper/streamfind
new file mode 100644
index 00000000..32b84a4e
--- /dev/null
+++ b/god/streams/bin/helper/streamfind
@@ -0,0 +1,10 @@
+#!/bin/sh
+cat stream.db | while read url name;do
+ curl $url --max-time 1 2>/dev/null| sed -n 's/[fF]ile[0-9]=\(.*\)/\1/p' > "streamfinder/$name"
+ if [ "x`cat \"streamfinder/$name\"`" == "x" ];then
+ rm "streamfinder/$name"
+ echo "$name empty or not a stream"
+ else
+ echo "wrote $name"
+ fi
+done
diff --git a/god/streams/bin/helper/streamwrite b/god/streams/bin/helper/streamwrite
new file mode 100644
index 00000000..a10fb155
--- /dev/null
+++ b/god/streams/bin/helper/streamwrite
@@ -0,0 +1,6 @@
+for i in `ls -1 streamfinder/`;
+do
+ for j in `cat "$i"`;do
+ echo "$j $i" >> direct.db
+ done
+done
diff --git a/streams/mpdstreams b/god/streams/bin/mpdstreams
index d9132937..a2a5f77c 100755
--- a/streams/mpdstreams
+++ b/god/streams/bin/mpdstreams
@@ -8,9 +8,8 @@ from subprocess import Popen, PIPE
os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])))
pidfile = "/tmp/krebs.stream.pid"
host="lounge.mpd.shack"
-url_file = os.environ.get("STREAM_DB", "stream.db")
+url_file = os.environ.get("STREAM_DB", "../db/stream.db")
urls = []
-#urls = [ url,f for (url,f) in open(url_file).readline() ]
for line in open(url_file):
urls.append(line.split())
#print urls
diff --git a/streams/relaxxapi.py b/god/streams/bin/relaxxapi.py
index f367caef..f367caef 100755
--- a/streams/relaxxapi.py
+++ b/god/streams/bin/relaxxapi.py
diff --git a/streams/relaxxstreams b/god/streams/bin/relaxxstreams
index 57cfb05b..0d3813a7 100755
--- a/streams/relaxxstreams
+++ b/god/streams/bin/relaxxstreams
@@ -15,9 +15,9 @@ from subprocess import Popen, PIPE
os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])))
pidfile = "/tmp/krebs.stream.pid"
-baseurl="http://elab.mpd.shack/"
+baseurl="http://lounge.mpd.shack/"
url=baseurl+"include/controller-playlist.php?action=%s&value=%s&json=%s"
-url_file = os.environ.get("STREAM_DB", "direct.db")
+url_file = os.environ.get("STREAM_DB", "../db/direct.db")
urls = []
for line in open(url_file):
diff --git a/streams/stream-starter b/god/streams/bin/stream-starter
index 4d3a406f..4d3a406f 100755
--- a/streams/stream-starter
+++ b/god/streams/bin/stream-starter
diff --git a/streams/streams.py b/god/streams/bin/streams
index 65669b2d..ea6e9a90 100644..100755
--- a/streams/streams.py
+++ b/god/streams/bin/streams
@@ -5,7 +5,7 @@ from subprocess import Popen, PIPE
os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])))
pidfile = "/tmp/krebs.stream.pid"
-url_file = os.environ.get("STREAM_DB", "stream.db")
+url_file = os.environ.get("STREAM_DB", "../db/stream.db")
urls = []
#urls = [ url,f for (url,f) in open(url_file).readline() ]
for line in open(url_file):
diff --git a/god/streams/db/direct.db b/god/streams/db/direct.db
new file mode 100644
index 00000000..02da4608
--- /dev/null
+++ b/god/streams/db/direct.db
@@ -0,0 +1,78 @@
+http://ice.somafm.com/groovesalad groove
+http://ice.somafm.com/u80s underground80s
+http://de.scenemusic.net/necta192.mp3 demoscene
+http://radio.krautchan.net:8000/radio.mp3 radiofreieskrautchan
+http://stream2.jungletrain.net:8000 jungletrain
+http://streams.xenim.de/radiotux.ogg radiotux
+http://localhost:8000/stream.ogg icecast
+http://localhost:8000/shice.ogg shice
+http://sfstream1.somafm.com:9090 480min
+http://mp1.somafm.com:8080 480min
+http://ice.somafm.com/480min 480min
+http://shouthostdirect11.streams.bassdrive.com:8398 bassdrive
+http://sanjose1.serverhostingcenter.streams.bassdrive.com:8600 bassdrive
+http://arces.net.streams.bassdrive.com:8000 bassdrive
+http://amsterdam1.serverhostingcenter.streams.bassdrive.com:8000 bassdrive
+http://shouthostdirect10.streams.bassdrive.com:8200 bassdrive
+http://shouthostdirect13.streams.bassdrive.com:8202 bassdrive
+http://czech1.serverhostingcenter.streams.bassdrive.com:8200 bassdrive
+http://shouthostdirect12.streams.bassdrive.com:8200 bassdrive
+http://beezle.streams.bassdrive.com:8765 bassdrive
+http://sfstream1.somafm.com:8384 beatblender
+http://sfstream1.somafm.com:8388 beatblender
+http://ice.somafm.com/beatblender beatblender
+http://sfstream1.somafm.com:8040 blackrockfm
+http://ice.somafm.com/brfm blackrockfm
+http://sfstream1.somafm.com:7000 bootliquor
+http://207.200.96.230:8014 bootliquor
+http://mp1.somafm.com:9004 bootliquor
+http://ice.somafm.com/bootliquor bootliquor
+http://sfstream1.somafm.com:8062 cliqhop
+http://mp2.somafm.com:2668 cliqhop
+http://ice.somafm.com/cliqhop cliqhop
+http://sfstream1.somafm.com:8700 covers
+http://ice.somafm.com/covers covers
+http://85.21.79.93:8040 deepmix
+http://212.7.194.133:8128 deepmix
+http://85.21.79.31:7128 deepmix
+http://69.163.134.109:8128 deepmix
+http://194.183.224.59:8128 deepmix
+http://radio.cdn.deluxemusic.tv/deluxemusic.tv/radio_web/mp3 deluxe
+http://sfstream1.somafm.com:8900 digitalis
+http://ice.somafm.com/digitalis digitalis
+http://205.234.246.42:8300 doomed
+http://sfstream1.somafm.com:8300 doomed
+http://ice.somafm.com/doomed doomed
+http://streamer-dtc-aa01.somafm.com:80/stream/1032 dronezone
+http://sfstream1.somafm.com:8014 dronezone
+http://mp2.somafm.com:8002 dronezone
+http://ice.somafm.com/dronezone dronezone
+http://sfstream1.somafm.com:8500 illstreet
+http://ice.somafm.com/illstreet illstreet
+http://sfstream1.somafm.com:8090 indypop
+http://ice.somafm.com/indiepop indypop
+http://sfstream1.somafm.com:8800 lush
+http://mp1.somafm.com:8800 lush
+http://ice.somafm.com/lush lush
+http://sfstream1.somafm.com:2020 missioncontrol
+http://mp1.somafm.com:2020 missioncontrol
+http://ice.somafm.com/missioncontrol missioncontrol
+http://sfstream1.somafm.com:2200 poptron
+http://ice.somafm.com/poptron poptron
+http://sfstream1.somafm.com:8002 secretagent
+http://mp2.somafm.com:9016 secretagent
+http://ice.somafm.com/secretagent secretagent
+http://sfstream1.somafm.com:8600 sonicuniverse
+http://mp2.somafm.com:8600 sonicuniverse
+http://ice.somafm.com/sonicuniverse sonicuniverse
+http://mp2.somafm.com:5400 southbysoma
+http://ice.somafm.com/sxfm southbysoma
+http://sfstream1.somafm.com:8000 spacestationsoma
+http://mp2.somafm.com:2666 spacestationsoma
+http://ice.somafm.com/spacestation spacestationsoma
+http://sfstream1.somafm.com:8850 suburbsofgoa
+http://ice.somafm.com/suburbsofgoa suburbsofgoa
+http://205.188.215.230:8010 tagstrip
+http://ice.somafm.com/tags tagstrip
+http://sfstream1.somafm.com:8880 underground80s
+http://ice.somafm.com/u80s underground80s
diff --git a/streams/stream.db b/god/streams/db/stream.db
index 2e873843..1d9b51bc 100644
--- a/streams/stream.db
+++ b/god/streams/db/stream.db
@@ -7,7 +7,7 @@ http://stream2.jungletrain.net:8000 jungletrain
http://playlist.tormentedradio.com/tormentedradio.pls tormented
http://filebitch.shack:8000 mpd
http://radio.krautchan.net:8000/radio.mp3 radiofreieskrautchan
-http://nl1.streamhosting.ch/listen.pls lounge
+http://nl1.streamhosting.ch:80 lounge
http://deluxetelevision.com/livestreams/radio/DELUXE_RADIO.pls deluxe
http://livestream.radiodarmstadt.de:8000 darmstadt
http://somafm.com/sxfm.pls southbysoma
@@ -26,7 +26,7 @@ http://somafm.com/bootliquor.pls bootliquor
http://somafm.com/covers.pls covers
http://somafm.com/illstreet.pls illstreet
http://somafm.com/tags.pls tagstrip
-http://somafm.com/groovesalad.pls groove
+http://somafm.com/groovesalad.pls groove
http://somafm.com/lush.pls lush
http://somafm.com/digitalis.pls digitalis
http://somafm.com/sonicuniverse.pls sonicuniverse
diff --git a/streams/relaxxplayer.api b/god/streams/doc/relaxxplayer.api
index 6e8af577..50d25af2 100644
--- a/streams/relaxxplayer.api
+++ b/god/streams/doc/relaxxplayer.api
@@ -2,7 +2,7 @@ http://lounge.mpd.shack/include/controller-playback.php?action=setCrossfade&valu
http://lounge.mpd.shack/include/controller-playback.php?action=repeat&value=1&json=null
http://lounge.mpd.shack/include/controller-playlist.php?action=clear&value=&json=null
http://lounge.mpd.shack/include/controller-playlist.php?action=addSong&value=http%3A%2F%2F212.7.194.133%3A8128&json=null
-http://lounge.mpd.shack/include/controller- playlist.php?action=getPlaylistInfo&value=0&json=
+http://lounge.mpd.shack/include/controller-playlist.php?action=getPlaylistInfo&value=0&json=
[{
"file": "http:\/\/212.7.194.133:8128",
"Title": "Max & Dima - Sapovnela Studio: Batut",
diff --git a/god/twinter/init_stripped.py b/god/twinter/init_stripped.py
index 4d359171..79550158 100644
--- a/god/twinter/init_stripped.py
+++ b/god/twinter/init_stripped.py
@@ -14,17 +14,16 @@ auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
mention = api.mentions()[0]
-mention_stripped = mention.text.replace("@shacktwinter","").lstrip().rstrip()
-mention_stripped = re.sub(r'[^\w _|@\[\]{}()<>:;!#$%^&+=-]+','',mention_stripped)[:32]
+mention_stripped =re.sub(r'[^\w _|@\[\]{}()<>:;!#$%^&+=-]+','',
+ mention.text.replace("@shacktwinter","").lstrip().rstrip())[:32]
f = open(os.path.dirname(os.path.abspath(sys.argv[0]))+"/msg_file","r+")
last = f.read()
-#sys.exit(23)
+
if last == mention_stripped:
print "received old message"
sys.exit(23)
else:
print "received new message: %s" % mention_stripped
-
s = socket(AF_INET, SOCK_STREAM)
send_message = \
'\x1b%%-12345X@PJL JOB\n@PJL RDYMSG DISPLAY="%s"\n@PJL EOJ\n\x1b%%-12345X' % (mention_stripped, )
@@ -37,4 +36,5 @@ else:
f.close()
if not mention.user.following:
mention.user.follow()
- api.update_status("@%s i appreciate your message '%s' for twinter! Ready Message updated." %(mention.user.screen_name,mention_stripped.upper()),in_reply_to_status_id=mention.id)
+ api.update_status("@%s i appreciate your message '%s' for twinter! Ready Message updated." %
+ (mention.user.screen_name,mention_stripped.upper()),in_reply_to_status_id=mention.id)
diff --git a/ivan/Makefile b/ivan/Makefile
new file mode 100644
index 00000000..38eb1da2
--- /dev/null
+++ b/ivan/Makefile
@@ -0,0 +1,7 @@
+.PHONY: infest
+BIN_DIR = ../bin
+infest:
+ cp ivan ${INSTALL_DIR}
+debian-startup:
+ cp ivan-startup /etc/init.d/ivan
+ update-rc.d evan start
diff --git a/evan/evan b/ivan/ivan
index 608ac6b8..5099114a 100755
--- a/evan/evan
+++ b/ivan/ivan
@@ -1,5 +1,5 @@
#!/bin/bash
-SATZ_LISTE=/krebs/evan/satz-liste
+SATZ_LISTE=/krebs/ivan/satz-liste
p="${noise_pitch-10}"
v="${noise_lang-de}"
k="${noise_capital-0}"
diff --git a/evan/evan-startup b/ivan/ivan-startup
index 8a7f8daa..8a7f8daa 100755
--- a/evan/evan-startup
+++ b/ivan/ivan-startup
diff --git a/evan/satz-liste b/ivan/satz-liste
index 44f84c13..44f84c13 100644
--- a/evan/satz-liste
+++ b/ivan/satz-liste
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index f686e34f..4de20223 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -231,7 +231,6 @@ done
#check for OS
if [ $OS -eq 0 ]; then
- echo $OS
find_os
fi
diff --git a/DNA/README.md b/sandbox/DNA/README.md
index 9de84746..9de84746 100644
--- a/DNA/README.md
+++ b/sandbox/DNA/README.md
diff --git a/DNA/linux/LICENSE b/sandbox/DNA/linux/LICENSE
index 94a9ed02..94a9ed02 100644
--- a/DNA/linux/LICENSE
+++ b/sandbox/DNA/linux/LICENSE
diff --git a/DNA/linux/Makefile b/sandbox/DNA/linux/Makefile
index 2ed4c9fb..2ed4c9fb 100644
--- a/DNA/linux/Makefile
+++ b/sandbox/DNA/linux/Makefile
diff --git a/DNA/linux/README.md b/sandbox/DNA/linux/README.md
index 0b6885e2..0b6885e2 100644
--- a/DNA/linux/README.md
+++ b/sandbox/DNA/linux/README.md
diff --git a/DNA/linux/TODO b/sandbox/DNA/linux/TODO
index fd0d927f..fd0d927f 100644
--- a/DNA/linux/TODO
+++ b/sandbox/DNA/linux/TODO
diff --git a/DNA/linux/krebs.c b/sandbox/DNA/linux/krebs.c
index df319c63..df319c63 100644
--- a/DNA/linux/krebs.c
+++ b/sandbox/DNA/linux/krebs.c
diff --git a/sandbox/README.md b/sandbox/README.md
new file mode 100644
index 00000000..fbf92cd9
--- /dev/null
+++ b/sandbox/README.md
@@ -0,0 +1,5 @@
+# Sandbox
+
+Sandbox contains all the projects which are either not yet production ready
+(too-new), or broken and old (too-old). Some of the code might work, but most
+won't do the right thing on your system, so try them with caution.
diff --git a/cobra/README b/sandbox/cobra/README.md
index 145ecd14..f9bb8026 100644
--- a/cobra/README
+++ b/sandbox/cobra/README.md
@@ -16,18 +16,19 @@ that contains an index.{js,sh,py,etc.} file.
like your sh's PATH
## example: cobra as some kind of make
-$ echo $COBRA_PATH
-.
-$ ls .
-foo/ bar/ baz/
-$ cat foo/cobra.json
-{ "deps": "bar", "baz" }
-$ cat bar/cobra.json
-No such file or directory
-$ cat baz/cobra.json
-No such file or directory
-$ cobra foo
-[cobra bar]
-[cobra baz]
-[cobra foo]
-$ exit
+
+ $ echo $COBRA_PATH
+ .
+ $ ls .
+ foo/ bar/ baz/
+ $ cat foo/cobra.json
+ { "deps": "bar", "baz" }
+ $ cat bar/cobra.json
+ No such file or directory
+ $ cat baz/cobra.json
+ No such file or directory
+ $ cobra foo
+ [cobra bar]
+ [cobra baz]
+ [cobra foo]
+ $ exit
diff --git a/cobra/hello/index.sh b/sandbox/cobra/hello/index.sh
index df2dea7c..df2dea7c 100644
--- a/cobra/hello/index.sh
+++ b/sandbox/cobra/hello/index.sh
diff --git a/cobra/index.sh b/sandbox/cobra/index.sh
index 1118a823..1118a823 100755
--- a/cobra/index.sh
+++ b/sandbox/cobra/index.sh
diff --git a/streams/README b/streams/README
deleted file mode 100644
index 82300c24..00000000
--- a/streams/README
+++ /dev/null
@@ -1,10 +0,0 @@
-streams done right
-
-deepmix,groovesalad and radiotux are now init.d scrips which can be
-started and stopped.
-
-scripts are dumped into /etc/init.d and groovesalad will be set as
-default via update-rc.d
-
-mplayer will be started in a tmux session either by creating a new
-session or starting a new window inside the first existing one
diff --git a/streams/streams b/streams/streams
deleted file mode 100755
index 80c654ad..00000000
--- a/streams/streams
+++ /dev/null
@@ -1,131 +0,0 @@
-#! /bin/bash
-set -euf
-
-stream_file=/tmp/krebs.stream.current
-
-HERE=$(dirname $(readlink -f $0))
-URLS=`cat $HERE/stream.db`
-CURRENT_STREAM="no stream" #will be set when calling `status`
-if [ ! `id -u` -eq "0" ]; then
- exec sudo "$0" "$@"
-fi
-
-#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
- tmux start-server
- if status &>/dev/null ; then
- echo "!! Stream already running!"
- exit 1
- fi
-
- if echo "$URLS" | while read URL NAME; do
- if [ "$NAME" = "$REQ" ];then
- tmux new-session -s streams -n streams -d "
- while sleep 1; do
- echo $NAME > $stream_file
- mplayer $URL
- done
- "
- echo "** $REQ started"
- exit 1
- fi
- done; then
- echo "!! Stream '$REQ' not found!"
- exit 1
- fi
-}
-function stop()
-{
- #stops every stream
- if status &>/dev/null; then
- status | cut -d\ -f2 | xargs printf "** killing %s\n"
- tmux kill-session -t streams 2>/dev/null || echo "!! killing session failed"
- else
- echo "** no stream running";
- return 1
- fi
-}
-
-function status()
-{
- #tmux has-session -t streams 2>/dev/null
- #RET=$?
-
- #tmux list-sessions 2>/dev/null
- #return $RET
- EV="`ps -ef | grep mplayer`"
- if echo "$URLS" | while read URL NAME; do
- if [ "`echo "$EV" | grep \"$URL\"`" ] ;then
- echo "** $NAME running ($URL)"
- exit 1
- fi
- done; then
- echo "** no stream running"
- return 1
- else
- return 0
- fi
-}
-function current()
-{
-
- return 1
-}
-function list()
-{
- echo "$URLS" | while read URL NAME ; do
- echo "$NAME : $URL"
- done
-
-}
-
-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
- start)
- start ${2-"`test -f $stream_file && cat $stream_file`"}
- ;;
- stop)
- stop
- ;;
- (switch|restart)
- stop
- start $2
- ;;
- status)
- status
- exit $?
- ;;
- list)
- list
- ;;
- (--help)
- short