Skip to content

Instantly share code, notes, and snippets.

View alexvandesande's full-sized avatar
🤖
Preventing human machine conflicts

Alex Van de Sande alexvandesande

🤖
Preventing human machine conflicts
View GitHub Profile
@alexvandesande
alexvandesande / README.md
Last active August 29, 2015 14:07 — forked from mbostock/.block
Ethereum User Surveys

This is a force directed graph using user data surveys from /r/ethereum expressing their interests. This is a fork of the Les Miserables graph by mbostock


A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

Uses Mist Coin for voting: 0xf4eced2f682ce333f96f2d8966c613ded8fc95dd
Owns 100,000 Mist coins for further distribution of funds
ADDRESS:
0x8d554c6c1631e44706e502433f0f958287d9b8dc
INTERFACE:
@alexvandesande
alexvandesande / Democratic Autonomous Organisation
Created November 26, 2015 17:31
Democratic Autonomous Organisation in Ethereum
/*
This creates a Democractic Autonomous Organization. Membership is based
on ownership of custom tokens, which are used to vote on proposals.
This contract is intended for educational purposes, you are fully responsible
for compliance with present or future regulations of finance, communications
and the universal rights of digital beings.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
@alexvandesande
alexvandesande / Blockchain Congress
Created January 27, 2016 18:10
The way this particular democracy works is that it has an *Owner** which works like an administrator, CEO or a President. The *Owner* can add (or remove) voting members to the organization. Any member can make a proposal, which is in the form of an ethereum transaction to either send ether or execute some contract and other members can vote in s…
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_
Address:
0x85935ee5773319756973cfd8ce5d3eb5831827ce
ABI:
[ { "constant": true, "inputs": [ { "name": "", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "", "template": "elements_input_uint" } ], "name": "proposals", "outputs": [ { "name": "recipient", "type": "address", "value": "0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb", "displayName": "recipient" }, { "name": "amount", "type": "uint256", "value": "10", "displayName": "amount" }, { "name": "description", "type": "string", "value": "Refund 10 ethers to Avsa as a test of the DAO", "displayName": "description" }, { "name": "votingDeadline", "type": "uint256", "value": "1454093006", "displayName": "voting Deadline" }, { "name": "executed", "type": "bool", "value": true, "displayName": "executed" }, { "name": "proposalPassed", "type": "bool", "value": true, "displayName": "proposal Passed" }, { "name": "numberOfVotes", "type": "uint256", "value": "1", "displayName": "number Of Votes" }, { "name": "currentResult", "type": "int256", "valu
var base10 = $('input[id="base10"]').numeric({ negative: false });
function syllable(n){
consonants = 'bcdfghjklmnprstvwz'; // consonants except hard to speak ones
vowels = 'aeiou'; // vowels
all = consonants + vowels; // all
text = '';
syllableStr = "";
if (n<90) {
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_
}
function transferOwnership(address newOwner) onlyOwner {
@alexvandesande
alexvandesande / proposal.sol
Created June 4, 2016 21:02
Proposal Framework
/*
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
/*
GENERIC TOKEN CONTRACT
THIS IS NOT THE REFUND CODE
*/
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract owned {
@alexvandesande
alexvandesande / Refund.js
Last active June 21, 2016 19:33
A refund contract for the DAO, to be voted on by a updateContract (no hard fork required)
/*
CODE TO MAKE THE DAO INTO AN AUTOMATIC REFUND
*/
// A generic token contract
contract token {
mapping (address => uint256) public balanceOf;
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function mintToken(address target, uint256 mintedAmount);