From 761db6a8b30f254b5349395c939111dedd8cf16b Mon Sep 17 00:00:00 2001 From: Momo Date: Sun, 4 Sep 2011 20:30:12 +0200 Subject: adding documentation --- god/licht | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/god/licht b/god/licht index f9fc8f69..cbff9ad0 100755 --- a/god/licht +++ b/god/licht @@ -1,4 +1,18 @@ #!/bin/bash +# +#SYNOPSIS +# //god/licht [options] [0/1] +#OPTIONS +# all - toggles all lights +# links - toggles all lights on the left hand side while looking towards the Auditorium +# rechts - toggles all lights on the right hand side while looking towards the Auditorium +# kuschel - toggles the lights in the pwnie corner +# software - toggles the software corner +# tische - toggles the lights on the window side of the long table +# porsche - toggles the lights on the window side where the porsche cockpit is +# ghetto - toggles the lights in the hallway +# 0-7 - toggles individual lights + toggle() { LAMPE=`echo "$1" | sed -n '/^[1-2]*[0-9]*[0-9]$/p' | xargs echo "obase=16;" | bc` TOGGLE=`echo "$2" | sed -n '/^[0-1]/p'` -- cgit v1.2.3 From 2b4fa0c5c5712096fb16df68f44af3a2954905a4 Mon Sep 17 00:00:00 2001 From: EUcancER Date: Mon, 5 Sep 2011 01:40:45 +0200 Subject: changed ticker for solidcoin now using mooncoin with appropriate gold module changing modules in scoreboard --- gold/Makefile | 1 + gold/mooncoin/ticker | 2 ++ gold/mooncoin/ticker_text.sh | 4 ++++ gold/scoreboard/modules/available/solidcoin/gather | 2 +- gold/scoreboard/modules/available/solidcoin/init | 8 ++++---- 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100755 gold/mooncoin/ticker create mode 100755 gold/mooncoin/ticker_text.sh diff --git a/gold/Makefile b/gold/Makefile index ff553def..69b9119b 100644 --- a/gold/Makefile +++ b/gold/Makefile @@ -1,3 +1,4 @@ install: ln -snf $$PWD/mtgox/ticker_text.sh ../bin/mtgox_ticker ln -snf $$PWD/scex/ticker_text.sh ../bin/scex_ticker + ln -snf $$PWD/mooncoin/ticker_text.sh ../bin/mooncoin_ticker diff --git a/gold/mooncoin/ticker b/gold/mooncoin/ticker new file mode 100755 index 00000000..1be3ed7f --- /dev/null +++ b/gold/mooncoin/ticker @@ -0,0 +1,2 @@ +#! /bin/sh +exec curl -ksS https://moonco.in/exchange/api/ticker/solidcoin diff --git a/gold/mooncoin/ticker_text.sh b/gold/mooncoin/ticker_text.sh new file mode 100755 index 00000000..fbaff55b --- /dev/null +++ b/gold/mooncoin/ticker_text.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -euf +cd $(dirname `readlink -f $0`) +./ticker | ../json/render/ticker diff --git a/gold/scoreboard/modules/available/solidcoin/gather b/gold/scoreboard/modules/available/solidcoin/gather index b4fe81f2..8b54bbb8 100755 --- a/gold/scoreboard/modules/available/solidcoin/gather +++ b/gold/scoreboard/modules/available/solidcoin/gather @@ -9,4 +9,4 @@ mkdir -p $LDIR # write into live directory and archive $SOLIDCOIND_PATH sc_getinfo | python $HERE/render | tee $LDIR/$LF >> $ADIR/$LF -echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/scex_ticker` | sed -e 's/High: //' -e 's/Low: //' -e 's/Last: //' | tee $LDIR/ticker_${LF}>> $ADIR/ticker_${LF} +echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/mooncoin_ticker` | sed -e 's/High: //' -e 's/Low: //' -e 's/Last: //' | tee $LDIR/ticker_${LF}>> $ADIR/ticker_${LF} diff --git a/gold/scoreboard/modules/available/solidcoin/init b/gold/scoreboard/modules/available/solidcoin/init index 165569a4..b44a1b6b 100755 --- a/gold/scoreboard/modules/available/solidcoin/init +++ b/gold/scoreboard/modules/available/solidcoin/init @@ -29,15 +29,15 @@ set size 0.5,0.5 set origin 0.5,0.0 plot "$ADIR/solidcoin" using 1:3 title "Difficulty" with lines -#set title "Scex Pricing" +#set title "Pricing" set notitle set tmargin 2 set size 1,0.5 set origin 0.0,0.5 set key left top -plot "$ADIR/ticker_solidcoin" using 1:2 smooth bezier title "Scex High" with lines , \ - "$ADIR/ticker_solidcoin" using 1:3 smooth bezier title "Scex Low" with lines , \ - "$ADIR/ticker_solidcoin" using 1:4 smooth bezier title "Scex Last" with lines +plot "$ADIR/ticker_solidcoin" using 1:2 smooth bezier title "High" with lines , \ + "$ADIR/ticker_solidcoin" using 1:3 smooth bezier title "Low" with lines , \ + "$ADIR/ticker_solidcoin" using 1:4 smooth bezier title "Last" with lines EOF -- cgit v1.2.3 From 19289a7161d0f2cf2e210bdfe4cd702f6d71928c Mon Sep 17 00:00:00 2001 From: EUcancER Date: Mon, 5 Sep 2011 01:43:17 +0200 Subject: using external stats provider instead of running own bitcoind this reduces the necessary maintenance overhead for bitcoind where i had some issues with overly sized databases on a small hdd bitcoinslc now provides the intel i am looking for: Difficulty and Current Block scoreboard -> bitcoin uses the new stats provider --- gold/Makefile | 1 + gold/bitcoinslc/bitcoinslc.stats | 4 ++++ gold/bitcoinslc/bitcoinslc.stats.render | 7 +++++++ gold/bitcoinslc/stats_text.sh | 4 ++++ gold/scoreboard/modules/available/bitcoin/gather | 3 ++- gold/scoreboard/modules/available/bitcoin/init | 6 +++--- 6 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 gold/bitcoinslc/bitcoinslc.stats create mode 100755 gold/bitcoinslc/bitcoinslc.stats.render create mode 100755 gold/bitcoinslc/stats_text.sh diff --git a/gold/Makefile b/gold/Makefile index 69b9119b..97ddcf71 100644 --- a/gold/Makefile +++ b/gold/Makefile @@ -2,3 +2,4 @@ install: ln -snf $$PWD/mtgox/ticker_text.sh ../bin/mtgox_ticker ln -snf $$PWD/scex/ticker_text.sh ../bin/scex_ticker ln -snf $$PWD/mooncoin/ticker_text.sh ../bin/mooncoin_ticker + ln -snf $$PWD/bitcoinslc/stats_text.sh ../bin/bitcoinslc_stats diff --git a/gold/bitcoinslc/bitcoinslc.stats b/gold/bitcoinslc/bitcoinslc.stats new file mode 100755 index 00000000..8547dbcc --- /dev/null +++ b/gold/bitcoinslc/bitcoinslc.stats @@ -0,0 +1,4 @@ +#! /bin/sh +# get mtgox ticker data +set -euf +curl -ksS https://www.bitcoins.lc/stats.json diff --git a/gold/bitcoinslc/bitcoinslc.stats.render b/gold/bitcoinslc/bitcoinslc.stats.render new file mode 100755 index 00000000..7ab26a02 --- /dev/null +++ b/gold/bitcoinslc/bitcoinslc.stats.render @@ -0,0 +1,7 @@ +#!/usr/bin/python + +import json,sys + +result = json.load(sys.stdin) + +print "Block: " + str(result["current_block"]) + " Difficulty: " + str(result["difficulty"]) diff --git a/gold/bitcoinslc/stats_text.sh b/gold/bitcoinslc/stats_text.sh new file mode 100755 index 00000000..2d146c86 --- /dev/null +++ b/gold/bitcoinslc/stats_text.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -euf +cd $(dirname `readlink -f $0`) +./bitcoinslc.stats | ./bitcoinslc.stats.render diff --git a/gold/scoreboard/modules/available/bitcoin/gather b/gold/scoreboard/modules/available/bitcoin/gather index 8b996428..22410f7b 100755 --- a/gold/scoreboard/modules/available/bitcoin/gather +++ b/gold/scoreboard/modules/available/bitcoin/gather @@ -7,6 +7,7 @@ mkdir -p $LDIR # write into live directory and archive -$BITCOIND_PATH getinfo | python $HERE/render | tee $LDIR/$LF >> $ADIR/$LF +#$BITCOIND_PATH getinfo | python $HERE/render | tee $LDIR/$LF >> $ADIR/$LF +echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/bitcoinslc_stats` | sed -e 's/Difficulty: //' -e 's/Block: //' | tee $LDIR/_${LF}>> $ADIR/${LF} echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/mtgox_ticker` | sed -e 's/High: //' -e 's/Low: //' -e 's/Last: //' | tee $LDIR/ticker_${LF}>> $ADIR/ticker_${LF} diff --git a/gold/scoreboard/modules/available/bitcoin/init b/gold/scoreboard/modules/available/bitcoin/init index cc5688bd..97b60402 100755 --- a/gold/scoreboard/modules/available/bitcoin/init +++ b/gold/scoreboard/modules/available/bitcoin/init @@ -35,9 +35,9 @@ set tmargin 2 set size 1,0.5 set origin 0.0,0.5 set key left top -plot "$ADIR/ticker_bitcoin" using 1:2 smooth bezier title "Scex High" with lines , \ - "$ADIR/ticker_bitcoin" using 1:3 smooth bezier title "Scex Low" with lines , \ - "$ADIR/ticker_bitcoin" using 1:4 smooth bezier title "Scex Last" with lines +plot "$ADIR/ticker_bitcoin" using 1:2 smooth bezier title "High" with lines , \ + "$ADIR/ticker_bitcoin" using 1:3 smooth bezier title "Low" with lines , \ + "$ADIR/ticker_bitcoin" using 1:4 smooth bezier title "Last" with lines EOF -- cgit v1.2.3