Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan ryepdx

View GitHub Profile
@ryepdx
ryepdx / mine.js
Last active Feb 10, 2018
Turn the Ethereum miner on and off intelligently to save your CPU when mining on a private chain.
View mine.js
// Adapted from Iuri Matias' Embark framework
// https://github.com/iurimatias/embark-framework
// Modified by ryepdx to mine at regular intervals.
(function() {
var main = function () {
if (!loadScript("config.js")) {
console.log("== config.js not found");
}
if (typeof(config) === "undefined") {
@ryepdx
ryepdx / zero_genesis.json
Created Aug 7, 2015
A genesis block with no difficulty
View zero_genesis.json
{
"nonce": "0xdeadbeefdeadbeef",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x686f727365",
"gasLimit": "0x8000000",
"difficulty": "0x0",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": {
@ryepdx
ryepdx / mine.js
Created Feb 28, 2016
A script to make geth mine at a slower rate. Useful for development on private chains.
View mine.js
// Adapted from Iuri Matias' Embark framework
// https://github.com/iurimatias/embark-framework
// Modified by ryepdx to mine at regular intervals.
(function() {
var main = function () {
if (!loadScript("config.js")) {
console.log("== config.js not found");
}
if (typeof(config) === "undefined") {
@ryepdx
ryepdx / config.js
Created Feb 28, 2016
An optional configuration file to go with mine.js
View config.js
config = {
interval_ms: 15000,
mine_pending_txns: true,
mine_periodically: true,
mine_normally: false
};
View cryptofresh_scraper.js
'use strict'
var scrap = require('scrap')
scrap('http://cryptofresh.com/u/maker-fund', function (err, $) {
if (err) {
console.error(err)
return
}
$('#body div.col-sm-8 span.action').each(function (i, row) {
You can’t perform that action at this time.