Skip to content

Instantly share code, notes, and snippets.

Avatar

Baby Goat mikeyb

View GitHub Profile
@mikeyb
mikeyb / mining_rig_install
Last active Aug 27, 2016
How I setup my headless mining rigs
View mining_rig_install
# My headless ubuntu 15.04 mining rig install
#
# Replace <username> with the username you chose during install
#
# Note: The mining_scripts repo listed below is still WIP and should be adjusted to your needs
# especially paths/usernames/hostnames
#
# By default it uses genoil ethminer, atrides eth-proxy and siacoin gominer with poolmod3
sudo visudo -f /etc/sudoers.d/README
View gist:d2fdc0101fc31932750ff05c28275e1f
1never9kNNkr27UseZSHnaEHg1z8v3Mbb
1gonnaV3MFNjymS4RGvUbHACstiS8aSYz
1giveGEk184Gwep2KT4UBPTcE9oqWzCVR
1youKBMLEohsexdZtkvnTzHnc4iU7Ffty
1upAbpBEWQ467QNT7i4vBMVPzSfQ3sqoQ
1never9kNNkr27UseZSHnaEHg1z8v3Mbb
1gonnaV3MFNjymS4RGvUbHACstiS8aSYz
11etAyypstpXLQpTgoYmYzT8M2foBSBe1
1youKBMLEohsexdZtkvnTzHnc4iU7Ffty
1downAsBbRQcBfUj8rgQomqhRsNFf1jMo
@mikeyb
mikeyb / ccregexsample
Last active Aug 24, 2016
credit card samples for regex testing (should all be valid)
View ccregexsample
MasterCards
5100000000000004
2720000000000000
2710000000000000
2290000000000000
2229000000000000
Visa
4111111111111111
View gist:6e39a9a58d0ec20cae9a4419fc2a3d02
if (cardNumberValue.match(/^((?:222\d{1})\d{12}|(?:22[3-9])\d{13}|(?:2[3-6])\d{14}|(?:27[1])\d{13}|(?:2720)\d{12}|(?:5[1-5])\d{14})$/)) {
return mastercardAccepted;
} else if(cardNumberValue.match(/^4(\d{12}|\d{15})$/)) {
return visaAccepted;
} else if(cardNumberValue.match(/^(?:3[47])\d{13}$/)) {
View gist:30614c2dd00f41fd436c48c10b41e5f8
### Keybase proof
I hereby claim:
* I am mikeyb on github.
* I am etcmiko (https://keybase.io/etcmiko) on keybase.
* I have a public key whose fingerprint is E5A4 645B ACDC 4E86 E33F AB42 43D7 19C3 1141 A76A
To claim this, I am signing this object:
View chips
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_
View gist:f6db1bc57a9eace79b024a8d449d1e13
WORD_BYTES = 4 # bytes in word
DATASET_BYTES_INIT = 2**30 # bytes in dataset at genesis
if (blockHeight >= ######) {
DATASET_BYTES_GROWTH = 2**23 # stop growing
} else {
DATASET_BYTES_GROWTH = 2**23 # dataset growth per epoch
}
CACHE_BYTES_INIT = 2**24 # bytes in cache at genesis
if (blockHeight >= ######) {
CACHE_BYTES_GROWTH = 0 # stop growing
@mikeyb
mikeyb / miningRigFrame.md
Created Nov 14, 2016
Wooden mining rig frame
View miningRigFrame.md

Parts

  • 2 x 96" furring strip (home depot will know what this is)
  • 2 x 4pcs galvanized corner braces 1.5"
  • 1 x 4pcs mending plates (should be very close to corner braces)
  • 1 x 2' x 4' plywood sheet (they are precut in little bins with all the plywood)

Instructions

Step 1. Measure and cut furring strip

  • For a 6gpu frame I would do 22" instead of 20" for the long rails like you see in my pics.
View startmining
#!/bin/bash
read -s KEY
curl -k -s "http://localhost:7733/api/v1/mining/start/${KEY// /%20}?api_key=YOURAPIKEY"
sleep 2
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' 'http://localhost:7733/api/v1/mining/info?api_key=YOURAPIKEY'
View checkmining
#!/bin/bash
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d '' 'http://heatstatus.com:7733/api/v1/mining/info?api_key=YOURAPIKEY'