diff options
author | makefu <github@syntax-fehler.de> | 2011-08-24 17:53:11 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2011-08-24 17:53:11 +0200 |
commit | 9a2947575515fe070fb63e640007f4d4ed952f85 (patch) | |
tree | 63d2085927916eaa955e37255ee04cb54930d0a1 | |
parent | bc901adc1441d6f11c53dacb5bbca7acdcf03361 (diff) | |
parent | 7c18a3d4e5897adb4ddd141aed261ce63daf1a10 (diff) |
Merge branch 'master' of github.com:krebscode/painload
-rwxr-xr-x | btc/mtgox/ticker_text.sh | 3 | ||||
-rw-r--r-- | cholerab/thesauron | 11 | ||||
-rw-r--r-- | evan/satz-liste | 21 | ||||
-rw-r--r-- | gold/btcguild/index.js (renamed from btc/btcguild/index.js) | 0 | ||||
-rwxr-xr-x | gold/json/render/ticker (renamed from btc/mtgox/json_ticker_helper.py) | 0 | ||||
-rw-r--r-- | gold/mining/CONFIGURE (renamed from btc/mining/CONFIGURE) | 0 | ||||
-rw-r--r-- | gold/mining/Makefile (renamed from btc/mining/Makefile) | 0 | ||||
-rw-r--r-- | gold/mining/README (renamed from btc/mining/README) | 0 | ||||
-rw-r--r-- | gold/mining/TODO (renamed from btc/mining/TODO) | 0 | ||||
-rwxr-xr-x | gold/mining/bin/archlinux-cruise-control (renamed from btc/mining/bin/archlinux-cruise-control) | 0 | ||||
-rwxr-xr-x | gold/mining/bin/ati_temper (renamed from btc/mining/bin/ati_temper) | 0 | ||||
-rwxr-xr-x | gold/mining/bin/cleanup_tmp (renamed from btc/mining/bin/cleanup_tmp) | 0 | ||||
-rwxr-xr-x | gold/mining/bin/ensure-router (renamed from btc/mining/bin/ensure-router) | 0 | ||||
-rwxr-xr-x | gold/mining/bin/ensure-wlan0 (renamed from btc/mining/bin/ensure-wlan0) | 0 | ||||
-rw-r--r-- | gold/mining/poll_btcguild (renamed from btc/mining/poll_btcguild) | 0 | ||||
-rw-r--r-- | gold/mining/user/.config/autostart/startup.desktop (renamed from btc/mining/user/.config/autostart/startup.desktop) | 0 | ||||
-rw-r--r-- | gold/mining/user/mining.ovdr (renamed from btc/mining/user/mining.ovdr) | 0 | ||||
-rwxr-xr-x | gold/mining/user/startup.sh (renamed from btc/mining/user/startup.sh) | 0 | ||||
-rwxr-xr-x | gold/mtgox/mtgox.getDepth (renamed from btc/mtgox/mtgox.getDepth) | 0 | ||||
-rwxr-xr-x | gold/mtgox/mtgox.getTrades (renamed from btc/mtgox/mtgox.getTrades) | 0 | ||||
-rwxr-xr-x | gold/mtgox/mtgox.ticker (renamed from btc/mtgox/mtgox.ticker) | 0 | ||||
-rwxr-xr-x | gold/mtgox/ticker_text.sh | 4 | ||||
-rwxr-xr-x | gold/scex/ticker | 2 | ||||
-rwxr-xr-x | gold/scex/ticker_text.sh | 4 | ||||
-rw-r--r-- | gold/scex/tracer/index.js | 58 | ||||
-rw-r--r-- | gold/scex/tracer/slurp.js | 38 |
26 files changed, 125 insertions, 16 deletions
diff --git a/btc/mtgox/ticker_text.sh b/btc/mtgox/ticker_text.sh deleted file mode 100755 index 2bcac134..00000000 --- a/btc/mtgox/ticker_text.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -dirname=`dirname $(readlink -f $0)` -$dirname/mtgox.ticker | python $dirname/json_ticker_helper.py diff --git a/cholerab/thesauron b/cholerab/thesauron new file mode 100644 index 00000000..07e274f5 --- /dev/null +++ b/cholerab/thesauron @@ -0,0 +1,11 @@ +Cholerab n. +- Kunstwort aus Kollaboration und Cholera. Beschreibt den Zustand, dass + Zusammenarbeit niemals gut, einfach und ohne Schmerzen funktioniert. +- Teamwork-Plattform für Krebscode. + +Nahziel n. +- Ziel mit höchst möglicher Priorität. + +Nahzielerfahrung n. +- das Erlebnis der (endgültigen) Nichterreichung eines Nahziels (obwohl + nur noch wenig ((quasi-) infinitesimal viel) nötig gewesen wäre). diff --git a/evan/satz-liste b/evan/satz-liste index 663aa572..bfdc8281 100644 --- a/evan/satz-liste +++ b/evan/satz-liste @@ -1,13 +1,8 @@ -wenn ich meinen erzeugten abfall vor dem nach hause gehen beseitige steigt mein soziales ansehen -bringe eine pflanze mit -ein sauberer scheck ist ein guter scheck -auch du weißt wie man den geschirrspüler einräumt -wer die toilette putzt kommt in den himmel -der große bruder sieht es gerne wenn die genossen die vereinsräume in stand halten -muelltrennung bringt gutes karma -dokumentiere deine projekte -werbe neue mitglieder -fnord -bewässere die Pflanzen -Öffne ein Fenster -wische die tische +Der Zugang zu Computern und allem, was einem zeigen kann, wie diese Welt funktioniert, sollte unbegrenzt und vollständig sein. +Alle Informationen müssen frei sein. +Mißtraue Autoritäten - fördere Dezentralisierung +Beurteile einen Hacker nach dem, was er tut und nicht nach üblichen Kriterien wie Aussehen, Alter, Rasse, Geschlecht oder gesellschaftlicher Stellung. +Man kann mit einem Computer Kunst und Schönheit schaffen. +Computer können dein Leben zum Besseren verändern. +Mülle nicht in den Daten anderer Leute. +Öffentliche Daten nützen, private Daten schützen diff --git a/btc/btcguild/index.js b/gold/btcguild/index.js index 1f33db06..1f33db06 100644 --- a/btc/btcguild/index.js +++ b/gold/btcguild/index.js diff --git a/btc/mtgox/json_ticker_helper.py b/gold/json/render/ticker index 727dd594..727dd594 100755 --- a/btc/mtgox/json_ticker_helper.py +++ b/gold/json/render/ticker diff --git a/btc/mining/CONFIGURE b/gold/mining/CONFIGURE index 299cbd53..299cbd53 100644 --- a/btc/mining/CONFIGURE +++ b/gold/mining/CONFIGURE diff --git a/btc/mining/Makefile b/gold/mining/Makefile index 8701920f..8701920f 100644 --- a/btc/mining/Makefile +++ b/gold/mining/Makefile diff --git a/btc/mining/README b/gold/mining/README index ad8c3468..ad8c3468 100644 --- a/btc/mining/README +++ b/gold/mining/README diff --git a/btc/mining/TODO b/gold/mining/TODO index bafaa72a..bafaa72a 100644 --- a/btc/mining/TODO +++ b/gold/mining/TODO diff --git a/btc/mining/bin/archlinux-cruise-control b/gold/mining/bin/archlinux-cruise-control index de5a0fa4..de5a0fa4 100755 --- a/btc/mining/bin/archlinux-cruise-control +++ b/gold/mining/bin/archlinux-cruise-control diff --git a/btc/mining/bin/ati_temper b/gold/mining/bin/ati_temper index 283a6024..283a6024 100755 --- a/btc/mining/bin/ati_temper +++ b/gold/mining/bin/ati_temper diff --git a/btc/mining/bin/cleanup_tmp b/gold/mining/bin/cleanup_tmp index e1395b19..e1395b19 100755 --- a/btc/mining/bin/cleanup_tmp +++ b/gold/mining/bin/cleanup_tmp diff --git a/btc/mining/bin/ensure-router b/gold/mining/bin/ensure-router index 5eedabc9..5eedabc9 100755 --- a/btc/mining/bin/ensure-router +++ b/gold/mining/bin/ensure-router diff --git a/btc/mining/bin/ensure-wlan0 b/gold/mining/bin/ensure-wlan0 index fa92c4f5..fa92c4f5 100755 --- a/btc/mining/bin/ensure-wlan0 +++ b/gold/mining/bin/ensure-wlan0 diff --git a/btc/mining/poll_btcguild b/gold/mining/poll_btcguild index 92a02657..92a02657 100644 --- a/btc/mining/poll_btcguild +++ b/gold/mining/poll_btcguild diff --git a/btc/mining/user/.config/autostart/startup.desktop b/gold/mining/user/.config/autostart/startup.desktop index 67c35ef8..67c35ef8 100644 --- a/btc/mining/user/.config/autostart/startup.desktop +++ b/gold/mining/user/.config/autostart/startup.desktop diff --git a/btc/mining/user/mining.ovdr b/gold/mining/user/mining.ovdr index d6cf6fec..d6cf6fec 100644 --- a/btc/mining/user/mining.ovdr +++ b/gold/mining/user/mining.ovdr diff --git a/btc/mining/user/startup.sh b/gold/mining/user/startup.sh index 6274a892..6274a892 100755 --- a/btc/mining/user/startup.sh +++ b/gold/mining/user/startup.sh diff --git a/btc/mtgox/mtgox.getDepth b/gold/mtgox/mtgox.getDepth index 9a607979..9a607979 100755 --- a/btc/mtgox/mtgox.getDepth +++ b/gold/mtgox/mtgox.getDepth diff --git a/btc/mtgox/mtgox.getTrades b/gold/mtgox/mtgox.getTrades index 73e5a68d..73e5a68d 100755 --- a/btc/mtgox/mtgox.getTrades +++ b/gold/mtgox/mtgox.getTrades diff --git a/btc/mtgox/mtgox.ticker b/gold/mtgox/mtgox.ticker index b24dfb35..b24dfb35 100755 --- a/btc/mtgox/mtgox.ticker +++ b/gold/mtgox/mtgox.ticker diff --git a/gold/mtgox/ticker_text.sh b/gold/mtgox/ticker_text.sh new file mode 100755 index 00000000..f585ffea --- /dev/null +++ b/gold/mtgox/ticker_text.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -euf +cd $(dirname `readlink -f $0`) +./mtgox.ticker | ../json/render/ticker diff --git a/gold/scex/ticker b/gold/scex/ticker new file mode 100755 index 00000000..a95d5910 --- /dev/null +++ b/gold/scex/ticker @@ -0,0 +1,2 @@ +#! /bin/sh +exec curl -ksS http://scexchange.bitparking.com:8080/api/ticker diff --git a/gold/scex/ticker_text.sh b/gold/scex/ticker_text.sh new file mode 100755 index 00000000..fbaff55b --- /dev/null +++ b/gold/scex/ticker_text.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -euf +cd $(dirname `readlink -f $0`) +./ticker | ../json/render/ticker diff --git a/gold/scex/tracer/index.js b/gold/scex/tracer/index.js new file mode 100644 index 00000000..e0c706e7 --- /dev/null +++ b/gold/scex/tracer/index.js @@ -0,0 +1,58 @@ +var http = require('http'); +var slurp = require('./slurp'); + +var options = { + host: 'scexchange.bitparking.com', + port: 8080, + path: '/api/t2' +}; + +var last_id = 0; +var last_price = 0; +function t2 () { + http.get(options, function(res) { + slurp(res, function (data) { + try { + data = JSON.parse(data); + } catch (exn) { + return console.error('[1;31m' + exn.stack + '[m'); + }; + data + .sort(function (a, b) { + return a.id - b.id; + }) + .forEach(function (x) { + if (x.id > last_id) { + last_id = x.id; + + x.date = new Date(Number(x.date) * 1000); + + var price = x.price.toString(); + while (price.length < 'x.xxxxxxxx'.length) { + price += 0; + } + if (x.price > last_price) { + price = '[32m' + price + '[m' + } + if (x.price < last_price) { + price = '[31m' + price + '[m' + } + last_price = x.price; + + var c = ({ buy: '[32m', sell: '[31m' })[x.type]; + var m = ''; + m += x.id + m += ' ' + JSON.parse(JSON.stringify(x.date)) + m += ' ' + price + m += ' ' + c + x.amount + '[m' + console.log(m); + + }; + }); + }); + }).on('error', function(e) { + console.log("Got error: " + e.message); + }); +}; + +setInterval(t2, 1000); diff --git a/gold/scex/tracer/slurp.js b/gold/scex/tracer/slurp.js new file mode 100644 index 00000000..70319743 --- /dev/null +++ b/gold/scex/tracer/slurp.js @@ -0,0 +1,38 @@ +module.exports = (function () { + + function join_buffers (buffers, length) { + var buffer = new Buffer(length); + var targetStart = 0; + buffers.forEach(function (x) { + x.copy(buffer, targetStart); + targetStart += x.length; + }); + return buffer; + }; + + function finish_it (req, buffers, length, callback) { + req.content = join_buffers(buffers, length); + return callback(req.content); + }; + + function nop () {}; + + return function (req, callback) { + if (req.hasOwnProperty('content')) { + return callback(req.content); + }; + var content = []; + var length = 0; + var end_handler = finish_it; + req.on('data', function (data) { + content.push(data); + length += data.length; + }); + [ 'end', 'close' ].forEach(function (event) { + req.on(event, function () { + finish_it(req, content, length, callback); + end_handler = nop; + }); + }); + }; +})(); |