Skip to content

Instantly share code, notes, and snippets.

View blakeberg's full-sized avatar

Björn Lakeberg blakeberg

View GitHub Profile
@blakeberg
blakeberg / CalculateTimeFromBlocks.js
Created May 1, 2016 17:54
CalculateTimeFromBlocks.js
var f = 1150000; //fork at block number
var b = 1139113; //block number
var t = 17; //avg time between blocks
var d = new Date('2016-03-12 16:38:45'); //datetime for b
d.setSeconds(d.getSeconds() + (f-b)*t); //datetime to fork
console.log(d);
//Mon Mar 14 2016 20:03:24 GMT+0100 (Mitteleuropäische Zeit)
@blakeberg
blakeberg / ParkingPlaces.sol
Created April 28, 2016 20:29
Solidity Contracts
/// @title Contract for Parking Places and Parking Reservations.
/// @author Bjoern Lakeberg
contract ParkingPlaces {
address public controller;
uint public blockCosts;
Place[] public places;
mapping (address => Place) placeOf;
struct Place {