From d4678ed9d0ca86c4e5e4ba43cdc5f5ff0fc2d004 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 May 2011 23:03:36 +0200 Subject: bigeyed: initial commit --- modules/bigeye/bigeyed | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 modules/bigeye/bigeyed (limited to 'modules/bigeye/bigeyed') diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed new file mode 100755 index 00000000..a1d558eb --- /dev/null +++ b/modules/bigeye/bigeyed @@ -0,0 +1,68 @@ +#! /bin/sh +# +# usage: bigeyed +# + +set -euf + +mkdir -vp /tmp/bigeye +cd /tmp/bigeye + +cleanup() { + test -n "$spid" && kill -9 $spid && spid= +} + +#python -m http.server 3 & server=$! +python -m SimpleHTTPServer 3 & spid=$? +trap cleanup EXIT HUP INT QUIT TERM + +base64 -d>favicon.ico</dev/null 2>/dev/null + #convert -brightness-contrast 20x10 00000001.jpg 00000002.jpg + mv 00000001.jpg index.jpg + cat>00000001.html< + + + $hostname's bigeye +

$date

+

ZOMBIECANCER

+EOF + mv 00000001.html index.html +} + +while blink; do + sleep 1 +done + -- cgit v1.2.3 From 9217fe6187b86a7bbf3406737c5fdfa2265d591a Mon Sep 17 00:00:00 2001 From: krebs Date: Tue, 17 May 2011 23:10:00 +0200 Subject: bigeyed: hostname w/o -f --- modules/bigeye/bigeyed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/bigeye/bigeyed') diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed index a1d558eb..92ae9cf4 100755 --- a/modules/bigeye/bigeyed +++ b/modules/bigeye/bigeyed @@ -35,7 +35,7 @@ EOF device="/dev/`cd /sys/class/video4linux && ls | head -n 1`" -hostname="`hostname -f`" +hostname="`hostname`" blink() { date="`date --rfc-3339=s`" echo $date -- cgit v1.2.3 From 0aafbf8fd8a4bda29f0f9bb2346b38efa6333adb Mon Sep 17 00:00:00 2001 From: krebs Date: Tue, 17 May 2011 23:12:58 +0200 Subject: bigeyed: find device every blink --- modules/bigeye/bigeyed | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/bigeye/bigeyed') diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed index 92ae9cf4..beb96b7c 100755 --- a/modules/bigeye/bigeyed +++ b/modules/bigeye/bigeyed @@ -33,12 +33,11 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== EOF -device="/dev/`cd /sys/class/video4linux && ls | head -n 1`" - hostname="`hostname`" blink() { date="`date --rfc-3339=s`" echo $date + device="/dev/`cd /sys/class/video4linux && ls | head -n 1`" mplayer -frames 1 -quiet \ -vo jpeg \ -tv driver=v4l2:device=$device:width=640:height=480 \ -- cgit v1.2.3 From 023130e949d6287404c80e4e4fc75e417743af33 Mon Sep 17 00:00:00 2001 From: krebs Date: Tue, 17 May 2011 23:36:50 +0200 Subject: bigeyed: utart needs 3 frames to initialize --- modules/bigeye/bigeyed | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/bigeye/bigeyed') diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed index beb96b7c..c246c872 100755 --- a/modules/bigeye/bigeyed +++ b/modules/bigeye/bigeyed @@ -37,13 +37,14 @@ 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 1 -quiet \ + mplayer -frames $frame -quiet \ -vo jpeg \ - -tv driver=v4l2:device=$device:width=640:height=480 \ - tv:// 1>/dev/null 2>/dev/null - #convert -brightness-contrast 20x10 00000001.jpg 00000002.jpg - mv 00000001.jpg index.jpg + -tv driver=v4l2:device=$device \ + tv:// #1>/dev/null 2>/dev/null + mv 0000000$frame.jpg index.jpg cat>00000001.html< -- cgit v1.2.3