From 22b068e9bd62589e95baac2d977c7eb2292416e3 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 19 Jun 2011 23:56:55 +0200 Subject: btcguild: initial commit --- btc/btcguild/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 btc/btcguild/index.js (limited to 'btc') diff --git a/btc/btcguild/index.js b/btc/btcguild/index.js new file mode 100644 index 00000000..1f33db06 --- /dev/null +++ b/btc/btcguild/index.js @@ -0,0 +1,20 @@ +api_key = process.env.api_key; + +var options = { + host: 'www.btcguild.com', + port: 80, + path: '/api.php?api_key=' + api_key +}; + +http = require('http'); +http.get(options, function(res) { + var data = ''; + res.on('data', function (chunk) { + data += chunk; + }); + res.on('end', function () { + console.log(JSON.parse(data)); + }); +}).on('error', function(e) { + console.error('Error: ' + e.message); +}); -- cgit v1.2.3 From d5b7db9f0c0974df32eff95f35f82afdab0bcbc7 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 21 Jun 2011 21:19:01 +0200 Subject: mining/user/mining.o{dv -> vd}r --- btc/mining/user/mining.odvr | 16 ---------------- btc/mining/user/mining.ovdr | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 btc/mining/user/mining.odvr create mode 100644 btc/mining/user/mining.ovdr (limited to 'btc') diff --git a/btc/mining/user/mining.odvr b/btc/mining/user/mining.odvr deleted file mode 100644 index d6cf6fec..00000000 --- a/btc/mining/user/mining.odvr +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/btc/mining/user/mining.ovdr b/btc/mining/user/mining.ovdr new file mode 100644 index 00000000..d6cf6fec --- /dev/null +++ b/btc/mining/user/mining.ovdr @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + -- cgit v1.2.3 From dda7277f37d4f8ffaa334b528fd63f4389cf966b Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Wed, 22 Jun 2011 00:05:54 +0200 Subject: added ati_temper --- btc/mining/user/bin/ati_temper | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 btc/mining/user/bin/ati_temper (limited to 'btc') diff --git a/btc/mining/user/bin/ati_temper b/btc/mining/user/bin/ati_temper new file mode 100755 index 00000000..283a6024 --- /dev/null +++ b/btc/mining/user/bin/ati_temper @@ -0,0 +1,5 @@ +#displays: CARD1TEMP CARD2TEMP CPUTEMP OUTSIDE +echo -n "`DISPLAY=:0 aticonfig --adapter=1 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " +echo -n "`DISPLAY=:0 aticonfig --adapter=2 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` " +echo -n "`sensors | grep temp1 | sed -e 's/temp1: *+\([0-9.]*\).*/\1/'` " +echo "`temper`" -- cgit v1.2.3 From f4acc6cc3d57be693bc79ec28ca05587f9d72b69 Mon Sep 17 00:00:00 2001 From: Felix Richter Date: Wed, 22 Jun 2011 00:15:03 +0200 Subject: Makefile: does more of the right things now Makefile will patch quirks from the live system: 1. /etc/init.d/live-boot 2. ati_license Makefile will install and configure lm-sensors --- btc/mining/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'btc') diff --git a/btc/mining/Makefile b/btc/mining/Makefile index c673ee3e..0fab7b1f 100644 --- a/btc/mining/Makefile +++ b/btc/mining/Makefile @@ -1,11 +1,18 @@ .PHONY: all format install select-target: @echo "You are made of stupid!" + echo "look here" + @cat Makefile format: cat README install: + apt-get install --yes lm-sensors echo '#!/bin/bash' > /usr/bin/ati_license + echo '#!/bin/sh' > /etc/init.d/live-boot + echo 'wall "going down"' >> /etc/init.d/live-boot + chmod 755 /etc/init.d/live-boot echo 'sudo tar xvf /opt/AMD-APP-SDK-v2.4-lnx64/icd-registration.tgz -C /' >> /usr/bin/ati_license cp -r user /home configure: - cat CONFIGURE + sensors-detect + @cat CONFIGURE -- cgit v1.2.3 From 3cf2e3aeef1f62429281399b2e7e3ae98408260d Mon Sep 17 00:00:00 2001 From: user Date: Wed, 22 Jun 2011 00:19:00 +0000 Subject: mining/user/startup.sh: use URL from env --- btc/mining/user/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'btc') diff --git a/btc/mining/user/startup.sh b/btc/mining/user/startup.sh index c330b984..eb2ce13a 100644 --- a/btc/mining/user/startup.sh +++ b/btc/mining/user/startup.sh @@ -3,7 +3,7 @@ sudo pkill tmux sleep 1 export DISPLAY=:0 -export URL="http://txgen_chinaman:lolwut@uk.btcguild.com:8332" +export URL="${URL-http://txgen_chinaman:lolwut@uk.btcguild.com:8332}" #export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334" slock & tmux start-server -- cgit v1.2.3