From 5f9b776d9d56390b030e1f49a44b6fa4cd370f8d Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 00:56:37 +0200 Subject: assimilator: add git-clone-into --- assimilator/bin/git-clone-into | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 assimilator/bin/git-clone-into diff --git a/assimilator/bin/git-clone-into b/assimilator/bin/git-clone-into new file mode 100755 index 00000000..67e820e6 --- /dev/null +++ b/assimilator/bin/git-clone-into @@ -0,0 +1,48 @@ +#! /bin/sh +# +# usage: git-clone-into repository directory +# +set -euf + +tempdir() { + set -- `tempnam $1` + mkdir $1 + echo $1 +} + +## [prefix] -> tempnam +tempnam() { + until set -- $1 ${1-}`candnam` && ! test -e $2; do :; done + echo $2 +} + +candnam() { + uuidgen 2>/dev/null || date +%s%N +} + + + + tmp_remote=`candnam` + tmp_branch=`candnam` + + subdir=$2 + if test -e $subdir; then + echo 'You are made of stupid!' >&2 + exit 23 + fi + tmpdir=`tempdir /tmp/tempdir-` + #trap "test -d $tmpdir && rm -vfR $tmpdir" EXIT + trap "test -d $tmpdir && rm -fR $tmpdir" EXIT + repository="${1-$repository}" + git clone "$repository" $tmpdir + (cd $tmpdir + subdir="$subdir" git filter-branch --tree-filter ' + if ! test -d $subdir; then + mkdir -p $subdir + git ls-tree -z --name-only $GIT_COMMIT | xargs -I. --null mv . $subdir + fi + ' + git checkout -b $tmp_branch) + git remote add $tmp_remote $tmpdir + git fetch $tmp_remote + git merge $tmp_remote/$tmp_branch # TODO configurable branch -- cgit v1.2.3 From 9f653aa2cce166e79a7f050730eff6c10568fb5d Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 00:59:46 +0200 Subject: cholerab README: add conflicts --- cholerab/README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cholerab/README b/cholerab/README index d6149751..7b53aeaa 100644 --- a/cholerab/README +++ b/cholerab/README @@ -61,3 +61,12 @@ - i.e. to start automatically at KREBS - the last stream should be playbacked - should be controlable by noise [see NOISE-STREAM-MODULE] + + +## merge conflicts below +view.py: contains view classes for cholerab +cholerab.py: main file + +start with : +python cholerab.py + -- cgit v1.2.3 From 699f1cba963131518f62c51dbab4d9e4ce35152a Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 01:27:55 +0200 Subject: Fixed the Makefile and renamed conditions.pl to conditions --- kachelmann/Makefile | 5 +++-- kachelmann/conditions | 7 +++++++ kachelmann/weather.xml | 1 - 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 kachelmann/conditions delete mode 100644 kachelmann/weather.xml diff --git a/kachelmann/Makefile b/kachelmann/Makefile index 277a5421..813f4dec 100644 --- a/kachelmann/Makefile +++ b/kachelmann/Makefile @@ -1,5 +1,6 @@ .PHONY: infect -INSTALL_DIR = /root/bin +INSTALL_DIR = /root/bin/ infect: mkdir -p /tmp/kachelmann/ - cp kachelmann ${INSTALL_DIR} + cp conditions ${INSTALL_DIR} + chmod +x ${INSTALL_DIR}conditions diff --git a/kachelmann/conditions b/kachelmann/conditions new file mode 100755 index 00000000..6d8b5541 --- /dev/null +++ b/kachelmann/conditions @@ -0,0 +1,7 @@ +#!/usr/bin/perl +use XML::Simple; +system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > /tmp/kachelmann/weather.xml"); +my $xml = new XML::Simple; +my $data = $xml->XMLin("/tmp/kachelmann/weather.xml"); +my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; +system("espeak \"$sentence\""); diff --git a/kachelmann/weather.xml b/kachelmann/weather.xml deleted file mode 100644 index 8a785308..00000000 --- a/kachelmann/weather.xml +++ /dev/null @@ -1 +0,0 @@ - -- cgit v1.2.3 From 0c6e0fab7eb09c2b2ca008a533d3f30a47e12bb0 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 01:31:44 +0200 Subject: Mde the Makefile to rename conditions to kachelmann in /root/bin --- kachelmann/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kachelmann/Makefile b/kachelmann/Makefile index 813f4dec..7fa3ec2d 100644 --- a/kachelmann/Makefile +++ b/kachelmann/Makefile @@ -3,4 +3,6 @@ INSTALL_DIR = /root/bin/ infect: mkdir -p /tmp/kachelmann/ cp conditions ${INSTALL_DIR} - chmod +x ${INSTALL_DIR}conditions + mv ${INSTALL_DIR}conditions ${INSTALL_DIR}kachelmann + chmod +x ${INSTALL_DIR}kachelmann + -- cgit v1.2.3 From 9bffc6a56d8ff54ead7fc518fec752897cdab0b8 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 01:34:09 +0200 Subject: Made kachelmann speak german --- kachelmann/conditions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kachelmann/conditions b/kachelmann/conditions index 6d8b5541..9880b397 100755 --- a/kachelmann/conditions +++ b/kachelmann/conditions @@ -4,4 +4,4 @@ system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" my $xml = new XML::Simple; my $data = $xml->XMLin("/tmp/kachelmann/weather.xml"); my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; -system("espeak \"$sentence\""); +system("espeak -v de \"$sentence\""); -- cgit v1.2.3 From b101e8a57e80526a0f0b607d399288b184b34091 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 01:36:29 +0200 Subject: Edited the output so espeak can pronounce it --- kachelmann/conditions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kachelmann/conditions b/kachelmann/conditions index 9880b397..1a798e42 100755 --- a/kachelmann/conditions +++ b/kachelmann/conditions @@ -3,5 +3,5 @@ use XML::Simple; system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > /tmp/kachelmann/weather.xml"); my $xml = new XML::Simple; my $data = $xml->XMLin("/tmp/kachelmann/weather.xml"); -my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; +my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Zelsius\n"; system("espeak -v de \"$sentence\""); -- cgit v1.2.3 From 65a8047157d2d5e0455090cc578a499e0a5f9e71 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 01:50:40 +0200 Subject: infest skel motd: use krebs-v2f --- infest/skel/etc/motd.tail | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/infest/skel/etc/motd.tail b/infest/skel/etc/motd.tail index 0e685c01..0b5dfcff 100644 --- a/infest/skel/etc/motd.tail +++ b/infest/skel/etc/motd.tail @@ -1,10 +1,14 @@ KREBS PAINLOAD (MORE COBRA) - x x x x - xx xx xx xx xx xx - xx xx xx xx xx xx - xxx x x xxx - x xxxxxxxxxxxx x - xxxxxxxxxxxxxxxx - x xxxxxxxxxxxx x - x x x x x x - x x x x x x +             +                          +                          +                     +                          +                      +                            +                +                        +              +                   +                   +                        -- cgit v1.2.3 From 04d3ac89486a5dfed2f6ece2579c78963f59944f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 6 Aug 2011 02:05:36 +0200 Subject: beep.lol: final commit --- beep.lol | 1 - 1 file changed, 1 deletion(-) delete mode 100755 beep.lol diff --git a/beep.lol b/beep.lol deleted file mode 100755 index f9c29dba..00000000 --- a/beep.lol +++ /dev/null @@ -1 +0,0 @@ -beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 466.16 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 587.32 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 300 -f 392.00 -D 150 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 392 -- cgit v1.2.3 From 5e983fbf03ff7e926797be80b97f31a4816444af Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 02:31:31 +0200 Subject: git-eternal-move: add to wrong location --- Refactory/bin/git-eternal-move | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 Refactory/bin/git-eternal-move diff --git a/Refactory/bin/git-eternal-move b/Refactory/bin/git-eternal-move new file mode 100755 index 00000000..075748fd --- /dev/null +++ b/Refactory/bin/git-eternal-move @@ -0,0 +1,11 @@ +#! /bin/sh +# +# git-eternal-move FROM TO +# +set -euf +git filter-branch --tree-filter " + set -euf + if test -e '$1'; then + mkdir -p '`dirname "$2"`' + mv '$1' '$2' + fi" -- cgit v1.2.3 From f55e7e8c29f510509b9853e1bd3727a94061c289 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 02:37:54 +0200 Subject: git-eternal-move: check $# --- Refactory/bin/git-eternal-move | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Refactory/bin/git-eternal-move b/Refactory/bin/git-eternal-move index 075748fd..bcf79501 100755 --- a/Refactory/bin/git-eternal-move +++ b/Refactory/bin/git-eternal-move @@ -3,9 +3,12 @@ # git-eternal-move FROM TO # set -euf -git filter-branch --tree-filter " +if test $# -ne 2; then + echo 'Error 1: You are made of stupid!' >&2 + exit 23 +fi +exec git filter-branch --tree-filter " set -euf if test -e '$1'; then - mkdir -p '`dirname "$2"`' mv '$1' '$2' fi" -- cgit v1.2.3 From a757a0badc6d90e57fc0cbb9b1bd4804f0089551 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 02:38:50 +0200 Subject: git-eternal-move: $2 is interpreted as dir --- Refactory/bin/git-eternal-move | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Refactory/bin/git-eternal-move b/Refactory/bin/git-eternal-move index bcf79501..50361e7b 100755 --- a/Refactory/bin/git-eternal-move +++ b/Refactory/bin/git-eternal-move @@ -1,6 +1,6 @@ #! /bin/sh # -# git-eternal-move FROM TO +# git-eternal-move FROM TO-DIRECTORY # set -euf if test $# -ne 2; then @@ -10,5 +10,6 @@ fi exec git filter-branch --tree-filter " set -euf if test -e '$1'; then + mkdir -p '$2' mv '$1' '$2' fi" -- cgit v1.2.3