summaryrefslogtreecommitdiffstats
path: root/Cancer
diff options
context:
space:
mode:
Diffstat (limited to 'Cancer')
-rw-r--r--Cancer/Kübelwagen/Makefile14
-rwxr-xr-xCancer/Kübelwagen/alarm27
-rw-r--r--Cancer/Kübelwagen/index.c206
-rwxr-xr-xCancer/Kübelwagen/playmobil12
-rw-r--r--Cancer/Kübelwagen/sin.js37
-rw-r--r--Cancer/assets/Makefile11
-rw-r--r--Cancer/assets/README44
-rwxr-xr-xCancer/assets/bin/asq2
-rwxr-xr-xCancer/assets/bin/ass24
-rwxr-xr-xCancer/assets/bin/check-truth11
-rwxr-xr-xCancer/assets/bin/fast20
-rwxr-xr-xCancer/assets/bin/truth2json37
-rw-r--r--Cancer/assets/doc/ass.txt9
-rw-r--r--Cancer/assets/doc/lexikon.txt12
-rw-r--r--Cancer/assets/doc/structs.nojson43
-rw-r--r--Cancer/assets/doc/usecases.txt71
-rwxr-xr-xCancer/assets/hooks/pre-commit8
-rwxr-xr-xCancer/bigeye/bigeyed70
l---------Cancer/bridge/README.md1
-rwxr-xr-xCancer/bridge/bin/bridge12
-rw-r--r--Cancer/bridge/etc/bash_completion.d/bridge18
-rwxr-xr-xCancer/bridge/lib/bridge/bin/attach10
-rwxr-xr-xCancer/bridge/lib/bridge/bin/create15
-rwxr-xr-xCancer/bridge/lib/bridge/bin/destroy12
-rwxr-xr-xCancer/bridge/lib/bridge/bin/list10
-rwxr-xr-xCancer/bridge/lib/bridge/bin/paste30
-rw-r--r--Cancer/bridge/share/doc/bridge/README.md59
-rw-r--r--Cancer/bridge/share/vim/vimfiles/plugin/bridge.vim113
-rwxr-xr-xCancer/git/git-clone-into48
-rwxr-xr-xCancer/git/git-eternal-move15
-rwxr-xr-xCancer/ircbot/bot.py81
-rw-r--r--Cancer/ircbot/feeds2
m---------Cancer/minikrebs0
-rwxr-xr-xCancer/query/jquery/index19
-rwxr-xr-xCancer/query/realpath/install41
-rwxr-xr-xCancer/query/realpath/src/realpath.rb10
-rw-r--r--Cancer/webchat/Makefile8
-rw-r--r--Cancer/webchat/index.js172
-rw-r--r--Cancer/webchat/package.json15
-rw-r--r--Cancer/webchat/proto_spec62
-rw-r--r--Cancer/webchat/public/client.js70
-rw-r--r--Cancer/webchat/public/functions.js54
-rw-r--r--Cancer/webchat/public/jquery-2.0.3.min.js6
-rw-r--r--Cancer/webchat/public/krebs.pngbin2583 -> 0 bytes
-rw-r--r--Cancer/webchat/public/reset.css126
-rw-r--r--Cancer/webchat/public/rpc.js99
-rw-r--r--Cancer/webchat/public/sockjs-0.3.min.js27
-rw-r--r--Cancer/webchat/public/sockjs_client_transport.js25
-rw-r--r--Cancer/webchat/sockjs_server_connection_transport.js26
49 files changed, 0 insertions, 1844 deletions
diff --git a/Cancer/Kübelwagen/Makefile b/Cancer/Kübelwagen/Makefile
deleted file mode 100644
index 9be84e13..00000000
--- a/Cancer/Kübelwagen/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-
-CC := gcc -std=c99
-CFLAGS := -D_XOPEN_SOURCE=500
-LIBS := $(shell pkg-config --cflags --libs jack) -lm
-
-.PHONY: all clean
-
-all: a.out
-
-clean:
- rm -f a.out
-
-a.out: index.c
- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
diff --git a/Cancer/Kübelwagen/alarm b/Cancer/Kübelwagen/alarm
deleted file mode 100755
index a117c433..00000000
--- a/Cancer/Kübelwagen/alarm
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-#
-# //Kübelwagen/alarm SLEEPARGS...
-#
-# where SLEEPARGS are passed to sleep(3)
-#
-set -euf
-cd $(dirname $(readlink -f $0))
-exec >&2
-
-make
-
-jackd -d alsa &
-trap "kill -0 $! && kill $!" EXIT INT
-
-for i in `seq 8000 1000 10000`; do
- echo $i 100
-done | ./a.out 1
-echo 'if you heard that sound, then goto sleep..^_^'
-
-echo sleep "$@"
-sleep "$@"
-
-echo 'wake up!'
-while :; do
- echo $(echo "($(od -tu -An -N 2 /dev/urandom)%1000)+500"|bc) $(echo "($(od -tu -An -N 2 /dev/urandom)%500)+100"|bc)
-done | ./a.out 1
diff --git a/Cancer/Kübelwagen/index.c b/Cancer/Kübelwagen/index.c
deleted file mode 100644
index 9a15c7c3..00000000
--- a/Cancer/Kübelwagen/index.c
+++ /dev/null
@@ -1,206 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <math.h>
-
-#include <jack/jack.h>
-
-const double PI = 3.14;
-
-/*Our output port*/
-jack_port_t *output_port;
-
-typedef jack_default_audio_sample_t sample_t;
-
-/*The current sample rate*/
-jack_nframes_t sr;
-
-/*samples in cycle*/
-jack_nframes_t samincy;
-/*the current offset*/
-long offset=0;
-
-/*frequency of our sound*/
-int tone = 262;
-int length = 1000000;
-
-char const *name = "<undefined>";
-
-int process (jack_nframes_t nframes, void *arg){
- /*grab our output buffer*/
- sample_t *out = (sample_t *) jack_port_get_buffer
- (output_port, nframes);
-
- int _tone = tone > 0 ? tone : 1;
-
- /*For each required sample*/
- for(jack_nframes_t i=0;i < nframes;i++){
- /*Copy the sample at the current position in the cycle to the buffer*/
-
- jack_nframes_t samincy = sr / _tone;
- sample_t scale = 2 * PI / samincy;
- out[i] = sin(offset * scale);
-
- /*and increment the offset, wrapping to 0 if needed*/
- /*(Dumb increment fixed thanks to Jussi Sainio)*/
- offset++;
- if(offset >= samincy)
- offset = 0;
- }
-
- return 0;
-}
-
-int srate (jack_nframes_t nframes, void *arg){
- printf ("the sample rate is now %lu/sec\n", nframes);
- sr=nframes;
- return 0;
-}
-
-void error (const char *desc){
- fprintf (stderr, "JACK error: %s\n", desc);
-}
-
-void jack_shutdown (void *arg){
- exit (1);
-}
-
-void usage(void) {
- fprintf (stderr, "usage: %s [Hz [ms]]\n", name);
-}
-
-int main (int argc, char *argv[]){
- jack_client_t *client;
- const char **ports;
-
- name = argv[0];
-
- if (argc < 2) {
- usage();
- return 1;
- }
- if (argc >= 2) {
- tone = atoi(argv[1]);
- if (tone == 0) {
- usage();
- return 1;
- }
- fprintf(stderr, "tone: %dHz\n", tone);
- if (argc >= 3) {
- length = atoi(argv[2]) * 1000;
- if (length == 0) {
- usage();
- return 1;
- }
- fprintf(stderr, "length: %dms\n", length/1000);
- }
- }
-
- /* tell the JACK server to call error() whenever it
- experiences an error. Notice that this callback is
- global to this process, not specific to each client.
-
- This is set here so that it can catch errors in the
- connection process
- */
- jack_set_error_function (error);
-
- /* try to become a client of the JACK server */
-
- if ((client = jack_client_open(argv[0], JackNullOption, NULL)) == 0) {
- fprintf (stderr, "jack server not running?\n");
- return 1;
- }
-
- /* tell the JACK server to call `process()' whenever
- there is work to be done.
- */
-
- jack_set_process_callback (client, process, 0);
-
- /* tell the JACK server to call `srate()' whenever
- the sample rate of the system changes.
- */
-
-
- jack_set_sample_rate_callback (client, srate, 0);
-
- /* tell the JACK server to call `jack_shutdown()' if
- it ever shuts down, either entirely, or if it
- just decides to stop calling us.
- */
-
- jack_on_shutdown (client, jack_shutdown, 0);
-
- /* display the current sample rate. once the client is activated
- (see below), you should rely on your own sample rate
- callback (see above) for this value.
- */
- printf ("engine sample rate: %lu\n", jack_get_sample_rate (client));
-
-
- sr=jack_get_sample_rate (client);
-
- /* create two ports */
-
-
- output_port = jack_port_register (client, "output",
- JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
-
- /* tell the JACK server that we are ready to roll */
-
- if (jack_activate (client)) {
- fprintf (stderr, "cannot activate client");
- return 1;
- }
-
- /* connect the ports*/
- if ((ports = jack_get_ports (client, NULL, NULL,
- JackPortIsPhysical|JackPortIsInput)) == NULL) {
- fprintf(stderr, "Cannot find any physical playback ports\n");
- exit(1);
- }
-
- int i=0;
- while(ports[i]!=NULL){
- if (jack_connect (client, jack_port_name (output_port), ports[i])) {
- fprintf (stderr, "cannot connect output ports\n");
- }
- i++;
- }
-
- free (ports);
-
- //while (1) { //scanf("%i %i", &tone, &length) == 2) {
- char buf[BUFSIZ];
- while (fgets(buf, BUFSIZ, stdin) == buf) {
- //if (strstr(buf, "Hz\n")) {
- // sscanf(buf, "%i", &tone);
- // fprintf(stderr, "%dHz\n", tone);
- //}
- //if (strstr(buf, "us\n")) {
- // sscanf(buf, "%i", &length);
- // fprintf(stderr, "%dus\n", length);
- //}
-
- int length = 0;
- int c;
- int pos = 0, n;
- while ((c = sscanf(buf + pos, "%i%i%n", &tone, &length, &n)) == 2) {
-
- if (length > 0) {
- usleep(length * 1000);
- }
-
- pos += n;
-
- fprintf(stderr, "%dHz %dms\n", tone, length);
- }
- }
- ///* 3 seconds of bleep is plenty*/
- ///usleep(length);
- jack_client_close(client);
-
- exit(0);
-}
diff --git a/Cancer/Kübelwagen/playmobil b/Cancer/Kübelwagen/playmobil
deleted file mode 100755
index 51ed70d6..00000000
--- a/Cancer/Kübelwagen/playmobil
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-file=`mktemp`
-trap "rm -f $file" EXIT INT TERM
-
-gcc -xc -lm -o $file - <<EOF
-#include<math.h>
-main(t) {
- for (t=${2-0};;++t) putchar($1);
-}
-EOF
-
-$file | aplay
diff --git a/Cancer/Kübelwagen/sin.js b/Cancer/Kübelwagen/sin.js
deleted file mode 100644
index 0f472715..00000000
--- a/Cancer/Kübelwagen/sin.js
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-var x = 3000;
-
-var t = 0;
-var i = 0;
-var j = 0.00001;
-var t0 = new Date();
-(function rec () {
-
- var t1 = new Date();
- console.error('dt = ' + (t1 - t0));
- t0 = t1;
-
- if (x === 3000) {
- x = 1000;
- } else {
- x = 3000;
- };
-
- console.log('2000 50 0 50 2000 50 0 50 ' + x + ' 100 0 0');
- return setTimeout(rec, 1000);
-
- i += 0.01;
- console.log((2000 + Math.sin(i) * 1000 | 0) + ' 0');
- return setTimeout(rec, 1);
-
- var f = Math.abs(1000 + 500 * Math.tan( t ));
- var scale = 1;
-
- console.log(((f * scale)|0) + ' 0');
-
- t++;
- setTimeout(rec, 100);
- //process.nextTick(rec);
-})();
diff --git a/Cancer/assets/Makefile b/Cancer/assets/Makefile
deleted file mode 100644
index 07efde82..00000000
--- a/Cancer/assets/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-
-hooks := pre-commit
-binaries := $(shell ls bin/)
-.PHONY: all
-
-all: $(addprefix ../db/.git/hooks/,$(hooks)) $(addprefix ../bin/,$(binaries))
-
-../bin/%: bin/%
- cp $< $@
-../db/.git/hooks/%: hooks/%
- cp $< $@
diff --git a/Cancer/assets/README b/Cancer/assets/README
deleted file mode 100644
index 7f90bfbf..00000000
--- a/Cancer/assets/README
+++ /dev/null
@@ -1,44 +0,0 @@
-# Asset tools for krebs
-
-## Prereqs
-Check out the current krebs-asset repo into //db
-
- git checkout root@db-host:/krebs.db.git db
-
-in //db/ is an append-only file known as 'truth'. it contains the assets and the history of these.
-Every commit is atomic, every line needs to be committed after being produced.
-
-## Usage
-### ass
-bin/ass has the power to add entries to the //db/truth file in the correct manner. It has two modes, create mode and set mode.
-Create mode produces new keys in the database, these database entries are unique.
-Set mode can set attributes to an entry in the database
-
-Example:
- ass create bob
- ass set bob type
- ass create bob-pc
- ass set bob-pc owner bob
- ass set bob-pc location bob\'s-home
-
-### asq
-asq is a tool to query the truth for facts. This is currently only a placeholder
-
-### FAST
-fast is a wrapper around the core ass. It should be used for adding lots and lots of new entries to the truth. It evaluates Variables from your environment.
-
-Example:
- export ASS_LOCATION=bob\'s-home
- export ASS_OWNER=bob
- fast c logitech-sidewinder-gamepad
- fast c arduino-uno
- fast s amount 3
-
-fast will then actually generate the following:
- ass create logitech-sidewinder-gamepad
- ass set logitech-sidewinder-gamepad owner bob
- ass set logitech-sidewinder-gamepad location bob\'s-home
- ass create arduino-uno
- ass set arduino-uno owner bob
- ass set arduino-uno location bob\'s-home
- ass set arduino-uno amount 3
diff --git a/Cancer/assets/bin/asq b/Cancer/assets/bin/asq
deleted file mode 100755
index 0204e05b..00000000
--- a/Cancer/assets/bin/asq
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/something
-# placeholder to asq the truth for facts
diff --git a/Cancer/assets/bin/ass b/Cancer/assets/bin/ass
deleted file mode 100755
index 5a4dade4..00000000
--- a/Cancer/assets/bin/ass
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -euf
-
-HERE=$(dirname $(readlink -f $0))
-DB="$HERE/../../db"
-JOURNAL="$DB/truth"
-(cd $DB && git pull >/dev/null && echo "pulled new version")
-
-METHOD="$1"; shift
-
-case $METHOD in
-"create")
- echo "`date --utc --rfc-3339=ns` create $1" | $HERE/check-truth | tee -a $JOURNAL
-;;
-"set")
- echo "`date --utc --rfc-3339=ns` set $1 $2 $3" | $HERE/check-truth | tee -a $JOURNAL
-;;
-*)
- echo "you are made of stupid!"
- exit 23
-;;
-esac
-(cd $DB && git commit -a -m bump >/dev/null && git push 1>&2 2>/dev/null && echo "updates pushed")&
diff --git a/Cancer/assets/bin/check-truth b/Cancer/assets/bin/check-truth
deleted file mode 100755
index 064a7d97..00000000
--- a/Cancer/assets/bin/check-truth
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-set -euf
-HERE=$(dirname $(readlink -f $0))
-DB="$HERE/../../db/truth"
-read LINE
-if (cat $DB;echo $LINE) | $HERE/truth2json - 1>/dev/null ;then
- echo "success" 1>&2
- echo "$LINE"
-else
- echo "you fail" 1>&2
-fi
diff --git a/Cancer/assets/bin/fast b/Cancer/assets/bin/fast
deleted file mode 100755
index 41725d0b..00000000
--- a/Cancer/assets/bin/fast
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-set -xeuf
-cd $(dirname $(readlink -f $0))
-
-if [ "$1" == "c" ];then
- ./ass create "$2" && export ASS_CREATED="$2"
- for i in `env | grep -v '^ASS_CREATED=' | grep "^ASS" | cut -d '=' -f 1`;do
- e=`echo $i | cut -d '_' -f 2 | tr '[A-Z]' '[a-z]'`
- eval con=\$$i
- $0 s "$e" "$con"
- done
-else if [ "$1" == "s" ]
-then
- ./ass set "${ASS_CREATED}" "${2}" "${3}"
- else
- echo "you are made of stupid!"
- cat $0
- exit 23
- fi
-fi
diff --git a/Cancer/assets/bin/truth2json b/Cancer/assets/bin/truth2json
deleted file mode 100755
index f85445b4..00000000
--- a/Cancer/assets/bin/truth2json
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-try:
- db=sys.argv[1]
-except:
- db="../../db/truth"
-
-ret = {}
-
-
-if db is "-":
- sys.stderr.write("Using stdin\n")
- f = sys.stdin
-else:
- sys.stderr.write("Using journal '%s'\n" % db)
- f = open(db)
-
-for line in f:
- lsplit = line.split()
- date = ' '.join(lsplit[0:2])
- cmd = lsplit[2]
- target = lsplit[3]
- if cmd == "create":
- assert target not in ret, "Target '%s' already created!" %target
- ret[target] = {}
- elif cmd == "set":
- key = lsplit[4]
- value = ' '.join(lsplit[5:])
- assert target in ret, "target '%s' not set yet!" % target
- ret[target][key] = value
- else:
- raise AssertionError,"unknown command '%s'!"
-
-import json
-print json.dumps(ret,sort_keys=True,indent=4)
diff --git a/Cancer/assets/doc/ass.txt b/Cancer/assets/doc/ass.txt
deleted file mode 100644
index f10d2ba1..00000000
--- a/Cancer/assets/doc/ass.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-ass usages:
-
-$0 create name
- if not "create name" in history and name is not retarded:
- echo "timestamp: create name" >> history
-
-$0 set name property value
- if "create name" in history and property is not retarded:
- echo "timestamp: set name property value" >> history
diff --git a/Cancer/assets/doc/lexikon.txt b/Cancer/assets/doc/lexikon.txt
deleted file mode 100644
index 0d362100..00000000
--- a/Cancer/assets/doc/lexikon.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-asset / N assets
-
-platz / plaetze
-
-root-server
-
-shared root-server
-
-recht / rechte
-
-datenbank
diff --git a/Cancer/assets/doc/structs.nojson b/Cancer/assets/doc/structs.nojson
deleted file mode 100644
index 4c084862..00000000
--- a/Cancer/assets/doc/structs.nojson
+++ /dev/null
@@ -1,43 +0,0 @@
-"name": // default: random (gensym)
- "type": "grafikkarte"
- "location": "kremium"
- "amount": 23 // default: 1
- "owner": "shack" // default: krebs
-
-"nebula":
- "type": "location"
- "owner": "tv"
-
-"tv":
- "type": "owner"
-
-"grafikkarte":
- "type": "type"
-
-"amount":
- "type": "natural"
-
-"root-server":
- "type": "irgend ein owner ist root"
-
-"shared":
- "type": "alle owner sind root"
-
-"oxberg":
- "type": "root-server"
- "location": "de"
- "ipv4-address": "84.23.80.172"
- "isp": "euserv"
- "ram": "512MiB"
-
-"ram":
- "must-match": /[0-9]+[MGk]iB/
-
-"kremium":
- "location": "nebula"
- "type": "root-server"
- "shared": true
-
-"euserv":
- "type": "ISP"
-
diff --git a/Cancer/assets/doc/usecases.txt b/Cancer/assets/doc/usecases.txt
deleted file mode 100644
index a3e2a4fa..00000000
--- a/Cancer/assets/doc/usecases.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-# use case #1: asset einsetzen
- Hat Krebs ein Grafikkarte, die gute genug ist.
- Wenn ja, dann will ich die in mein Computer einbauen.
-
-# use case #2: asset soll in der Ursprungszustand versetzt werden.
- Urkrebs Mainboard-Batterie is leer und braucht Ersatz.
- Haben wir so eine Batterie und falls ja, dann soll sie
- fuer immer in Urkrebs rein.
-
-# use case #3: asset einlagern
- Grafikkarte aus use case #1 (#2) soll wieder zurueck.
-
-# use case #4: asset ausschlachten
- Urkrebs ist bis auf das Netzteil zerstoert worden,
- das Netzteil soll eingelagert werden.
-
-# use case #5: asset hinzufuegen
- Krebs erhaelt einen neuen Computer.
-
-# use case #6: asset finden
- Wo oder bei wem ist das USB-Thermometer?
-
-# use case #7: asset details finden
- Wie viele 4-Port-USB-Hubs hat krebs und wo sind die?
-
-# use case #8: verlust eines assets
- Urkrebs ist physikalisch verschwunden, aber noch in der datenbank
- eingetragen.
- Welt der Dinge und der Daten muessen wieder synchron sein.
-
-# use case #9: asset anzahl erniedrigen; assets mergen
- Eines von hundert 4-Port-USB-Hubs soll von platz X entnommen werden
- und an ein asset gestoepselt werden.
-
-# use case #A: asset entfernen
- Urkrebs wir vom Besitzer ausserhalb von krebs benoetigt und dem Bestand
- entnommen.
-
-# use case #B: verlust eines platzes
- platz ist explodiert und ein Teil der eingelagerten assets wurde vernichtet,
- der andere Teil muss migriert werden.
-
-# use case #C: assets eines platzes erfragen
- Was in an platz X eingelagert?
-
-# use case #D:
- X war noch nie KM, hat aber unberechtigter weise assets, plaetze, rechte.
- assets muessen an andere plaetze migriert werden.
- dinge, die wie assets waren, aber nie wirklich assets waren, muessen aus der
- datenbank entfernt werden.
- plaetze muessen aus datenbank entfernt werden.
- X muss entrechtet werden.
-
-# use case #E: assets in assets
- Batterien liegen im Bankschliesfach X an platz Y.
-
-# use case #F:
- ein root-server ist verschwunden.
-
-# use case #G:
- welche shared root-server hat krebs in uk?
-
-# use case #H:
- ein asset soll umbenannt werden, da der alte name nicht passend war.
-
-# use case #I:
- welchen namen hat der Rechner, auf dem ich gerade bin?
-
-# use case #I.2:
- welchen namen hat das asset in meiner Hand?
-
diff --git a/Cancer/assets/hooks/pre-commit b/Cancer/assets/hooks/pre-commit
deleted file mode 100755
index 6ad1ca2a..00000000
--- a/Cancer/assets/hooks/pre-commit
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -euf
-if which truth2json;then
- truth2json >/dev/null && echo "db verified"
-else
- echo "cannot verify as truth2json is not installed"
-fi
-
diff --git a/Cancer/bigeye/bigeyed b/Cancer/bigeye/bigeyed
deleted file mode 100755
index 5aa36210..00000000
--- a/Cancer/bigeye/bigeyed
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh
-#
-# usage: bigeyed
-#
-
-set -euf
-
-mkdir -vp /tmp/bigeye
-cd /tmp/bigeye
-
-cleanup() {
- test -n "$spid" && kill -9 $spid && spid=
-}
-
-port=`touch /dev/bigeye 2>/dev/null && rm /dev/bigeye && echo 3 || echo 3333`
-
-#python -m http.server $port & server=$!
-python -m SimpleHTTPServer $port & spid=$?
-trap cleanup EXIT HUP INT QUIT TERM
-
-base64 -d>favicon.ico<<EOF
-AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAVQAAAKoAAABVVQAAVVVVAP9VVQCqqgAAqqqqAP+qqgD//6oAVf//AKr//wD///8A
-AAAAAAAAAAAAAAAAnHzMd3REQAAAAABERERHm8nMx3REQAAAAAAAAERERHmXx3dEAAAAAAAAAAAA
-R0REzMREQAAAAzNLu0BAAAR0RMxEQAAAMzMURES7REAARHfEQAADMzNERERERLtEAAR3RAAAMzBE
-R3dwRABEtEAER0AAMzgER3d3e0REAEtEAEQAAzGwRHMzAAAHREADtEAEAAMbBEcwAAAAAHdEADtE
-AAAxS0RzAAEAAAALdEAztEADNERHMAAQAAAAALdDA7tAE0S0swAAABEAAAAHdDS7RBNLRLMAAAEA
-ERAQC3M0N4QzS0tzABAQAAAAAQB0AEeHNEtLcBARABAAEAAAdDBHhBRLR3ABF1VVEREAAXRESIRE
-S0dwF3FQUVUREAF0REiEd3d3wQVZQVVBQUEIh3iZhIfMzMwFlRRVVBQUC3x4iYQHd8fMAJFRQUFB
-QAt6R0uEB8d0vIAJFBQUFAC3x0S7hAd4dEzIAVVBQUALd6REukcAd3hEzMgVFBQAt3dES6RAcAe4
-hEd8yIiIjLd4SEtEAGcHe8xEd3fMjHd3hEzEQABmcES4hERHd3fHdETLRAAMJmYERIiIRERERESZ
-tEAAzBEWYARMnIiIiIiIm0QADMchEXYAREnJycnMy0RADMybARISYABEREREtEREAMzJexAhIWEA
-AERERERAAAzMebsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
-EOF
-
-hostname="`hostname`"
-blink() {
- date="`date --rfc-3339=s`"
- echo $date
- # nobody will ever need more than 3 frames to initialize!
- frame=4
- device="/dev/`cd /sys/class/video4linux && ls | head -n 1`"
- mplayer -frames $frame -quiet \
- -vo jpeg \
- -tv driver=v4l2:device=$device \
- tv:// #1>/dev/null 2>/dev/null
- mv 0000000$frame.jpg index.jpg
- cat>00000001.html<<EOF
- <!doctyle html>
- <META HTTP-EQUIV="REFRESH" CONTENT="2">
- <style type="text/css">
- body {