summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-05 20:46:22 +0200
committertv <tv@xso>2011-09-05 20:46:22 +0200
commitcbeb3f56c562905b97d1c3fec8b5ebfa9684c149 (patch)
tree68eacbea50a8f460a7f8566fe955319e780a0412
parent2f5655ced03243ef03eb3417c9f090117568a885 (diff)
parent2cf53c89ee1027ef5629a71b3ca98c90a8801a17 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rwxr-xr-xgod/licht14
-rw-r--r--gold/Makefile2
-rwxr-xr-xgold/bitcoinslc/bitcoinslc.stats4
-rwxr-xr-xgold/bitcoinslc/bitcoinslc.stats.render7
-rwxr-xr-xgold/bitcoinslc/stats_text.sh4
-rwxr-xr-xgold/mooncoin/ticker2
-rwxr-xr-xgold/mooncoin/ticker_text.sh4
-rwxr-xr-xgold/scoreboard/modules/available/bitcoin/gather3
-rwxr-xr-xgold/scoreboard/modules/available/bitcoin/init6
-rwxr-xr-xgold/scoreboard/modules/available/solidcoin/gather2
-rwxr-xr-xgold/scoreboard/modules/available/solidcoin/init8
11 files changed, 47 insertions, 9 deletions
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'`
diff --git a/gold/Makefile b/gold/Makefile
index ff553def..97ddcf71 100644
--- a/gold/Makefile
+++ b/gold/Makefile
@@ -1,3 +1,5 @@
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/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/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
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