Skip to content

Instantly share code, notes, and snippets.

View veox's full-sized avatar
💭
Being skeptical of status feature.

Noel Maersk veox

💭
Being skeptical of status feature.
View GitHub Profile
@gevans
gevans / README.md
Last active August 29, 2015 13:57
Patches to add --no-client-reconnect CLI option to bfgminer 3.10.0, cgminer 3.7.2, and sgminer 4.1.153

These patches add a new CLI option: --no-client-reconnect. The changes are adapted from Kalroth's cgminer fork to be compatible with BFGMiner, CGMiner, and SGMiner. This solves a few reported security issues.

Usage

Patches can be applied to the source in a number of ways...

BFGMiner

# In a git clone:
@CJentzsch
CJentzsch / Refund.sol
Created July 5, 2016 15:54
Refund contract
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
contract ethExchange {
address public public ethClassicWithdrawer;
address public public ethForkWithdrawer;
bool public accepted;
address public refundContract = '0xbf4ed7b27f1d666546e30d74d50d173d20bca754';
function ethExchange(uint amountToExchange) {
ethClassicWithdrawer = msg.sender;
}
contract VoteRegistration {
// stores the information about the current node.
// This variable can only be changed via a hard fork
bytes32 public forkHash = sha3('');
// stores the array of all registered voters
mapping (address => address) public voteContracts;
// checks if the lock is active
bool public active = false;
@D-Nice
D-Nice / DatePayout.sol
Last active November 28, 2016 11:44
Contract for locking a certain amount of ether until a set date
contract DateTime {
/*
* Credit to pipermerriam for this utility contract
*
* Date and Time utilities for ethereum contracts
*
* address: 0x1a6184cd4c5bea62b0116de7962ee7315b7bcbce
*/
function toTimestamp(uint16 year, uint8 month, uint8 day) constant returns (uint timestamp);
contract SplitFunds {
function split(address[] addrs){
if(!addrs[uint(block.blockhash(block.number-1)) % addrs.length].send(msg.value)) throw;
}
}
/**
* Author: Nick Johnson <arachnid at notdot.net>
*
* WARNING: This contract is new and thus-far only lightly tested. I'm fairly
* confident it operates as described, but you may want to assure yourself of
* its correctness - or wait for others to do so for you - before you trust your
* ether to it. No guarantees, express or implied, are provided - use at your
* own risk.
*
* @dev Ether vault contract. Stores ether with a 'time lock' on withdrawals,

.eth Registrar using only Deposits.md

This is an attempt of setting up a name registrar that use deposits instead of burning or token contributions and tries to optimize name utility and reduce domain squatting. Previous initiatives of charging a "rent" based on the market price with an yearly auction proved impopular with many developers as they believed the registrar wasn't delivering any value for the "tax" as well as worries that a sudden big auction could force someone unexpectedly to be forced to sell the name.

In order to start doing that let's define the problem:

Name squatting is defined as buying a name and not adding any value to it, just holding it expecting that domains names will become more valuable in the future. Let's assume that all name buyers have the intention of acquiring a name and make it more valuable over time, either by working on it as a business and adding value to the "brand", or by working to increase the chances of finding a

@pdaian
pdaian / ethereum_graphs.py
Created February 13, 2017 19:12
Ethereum Fork Market Data Graphing Script
import datetime, requests
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import json, collections, os
UTC_OFFSET = -14400 # Local offset from UTC
START_DATE = "2016-01-01" # Day to start chat
TMP_DIR = "/tmp" # Writable temp directory, without trailing slash
layout title date
post
contract creation golf
2018-02-22 17:33

Fun little learning exercise, what's the shortest bytecode you can send that will publish a contract with non-zero bytecode? The response to getCode() should have some characters that aren’t either 0 or x.

To test it out: