Skip to content

Instantly share code, notes, and snippets.

View simondlr's full-sized avatar
Working on "This Artwork Is Always On Sale".

Simon de la Rouviere simondlr

Working on "This Artwork Is Always On Sale".
View GitHub Profile
simondlr / gist:8fb127c40177bc4d87cb
Last active August 29, 2015 14:06
Optionally mapping names to OpenBazaar GUIDs using Namecoin & DNSChain.

User-friendly names that map to GUIDs have several benefits in the development of a web-of-trust for reputation based in commerce (as put forth by Dionysis: For example, to access specific stores, users send around their GUIDs (as can be seen here: It's easier to remember reputable stores by their user-friendly names.

Here's a proposal to implement such a user-friendly system in OpenBazaar that is acceptably (debatable) decentralized using the Namecoin blockchain ( & DNSChain ( model & server tools.

Namecoin + DNSChain + OpenBazaar GUIDs.


Namecoin is a decentralized key-value store using blockchain technology. It's been used to map decentralized domains (using .bit) & identities (using namespaces such id or u: amongst other uses. It is the m

simondlr /
Last active August 29, 2015 14:08
Installing Counterparty/Dogeparty/ClearingHouse etc on OS X natively.

Since there's always hiccups, I documented my install process to get a local Dogeparty Wallet running on OS X [there's no build procedure for it yet]. This will work with Counterparty & Clearinghouse as well (and other upcoming XCP implementations). This will likely be old-hat once a proper build-procedure is in place.

The dockers here from Lars give helpful tips on how the setup would work with VMs:

  1. Install Dogecoind. Let it sync up with txindex=1 & server=1.
  2. Install Doge Insight. Problems with npm, so had to use npm upgrade. Dogecoin had old block store, so had to pipe blk.dats to bootstrap.dat, delete dogecoin conf, and reimport blocks for proper sync. Export proper variables for insight. Connect, and run node insight.js (after npm install). Halfway through, ran into magic number auxwow error. Switch to use RPC at block 371337 instead of PERCENTAGE_TO_SYNC_RPC_FROM.
  3. Clone dogepartyd. Install Python3. Upgrade virtualenv itself to use python3. Create virtu
contract Generic is owned {
function() {
if(functions[msg.sig] != 0x0) {
function changeMapping(bytes4 _functionSignature, address _addrOfFunction) {
if(msg.sender == owner) {
simondlr / gist:1594612
Created January 11, 2012 13:18
.vimrc of simondlr
set number "show line numbers
set numberwidth=1 "Line numbers width
set smartindent
set tabstop=4 "set tab character to 4 characters
set shiftwidth=4 "indent width for autoindent
"Show status line.
set laststatus=2
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L:%c
simondlr /
Created June 5, 2012 17:29
from djcelery import celery
def add(x,y):
return x + y
def sleeptask(i):
from time import sleep
simondlr /
Created June 5, 2012 17:34
# Create your views here.
from django.http import HttpResponse
from app import tasks
def test_celery(request):
result = tasks.sleeptask.delay(10)
result_one = tasks.sleeptask.delay(10)
result_two = tasks.sleeptask.delay(10)
return HttpResponse(result.task_id)
simondlr / gist:f48c5f47d06a0d4662b999903826bebf
Last active November 25, 2016 12:40
Private Network Test
Simon's peer:
Simon's IP:
Do. admin.addPeer("enode://56d33cb7dcd7bcf147e18597ef6ea4270c2202bf3e63905ba9d95916c44ef0ac17a9dfae3afe2c38cb31967bbb813c48482e5294497ba6f7df20da09793ba49a@")
Create Genesis Block using "sh"
then run:
simondlr / gist:cd13348d0f578e2f5cd49cb7f5501801
Created November 30, 2016 20:17
Testing throws in Solidity
pragma solidity ^0.4.4;
This is for testing if a transaction would throw.
Contract calls rethrow when it encounters errors.
Raw calls do not.
You wrap your contract you want to test in a ThrowProxy.
You prime it by calling the fallback function.
Then executing it.
simondlr / gist:b08f32eeb8f9eec52ec4124d13c18242
Last active January 19, 2017 14:55
Barclays Prague Comms. Communicate here.
Barclays Prague Comms:
-> Paste address and other things in the comments.