Skip to content

Instantly share code, notes, and snippets.

Matthieu Riou matthieu

Block or report user

Report or block matthieu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
matthieu /
Last active Aug 29, 2015
Decrypts and send the send_a_candy JSON to BlockCypher to create a microtransaction
openssl enc -d -aes-256-cbc -base64 -in send_a_candy.json.aes256 2>&1 | \
curl -H "Content-Type: application/json" -d @-$1
matthieu / new_address_curl
Last active Aug 29, 2015
Get a new address and keys from BlockCypher
View new_address_curl
$ curl -X POST
"private": "da01587298ff1721a968539e87329abe18f9b20cb46124eb650671662d3acd1a",
"public": "02d47eaaca7f9b96a977c996396d1668a729155c02a18a37429ca5be9cfda91893",
"address": "1PjfjXBM4GQs8FaNFESiUZzQwVxMHXdBXG",
"wif": "L4XV4V5ACQmrtJn7ombma3sdqNrn1T9FFfwjLUaHVmd7Qz5iNHTt"
matthieu / send_a_candy.json
Created Mar 11, 2015
Partial JSON to POST to BlockCypher for a candy-size microtransaction
View send_a_candy.json
"from_private": "da01587298ff1721a968539e87329abe18f9b20cb46124eb650671662d3acd1a",
"value_satoshis": 2000000,
"token": "37048cd01f250eca918ab55b658de3ec"
matthieu / encrypt_send_a_candy
Last active Aug 29, 2015
Encrypt a JSON file before POSTing to BlockCypher
View encrypt_send_a_candy
$ openssl enc -aes-256-cbc -base64 -in send_a_candy.json -out send_a_candy.json.aes256

Keybase proof

I hereby claim:

  • I am matthieu on github.
  • I am mriou ( on keybase.
  • I have a public key whose fingerprint is 45B8 A602 A54E FB5E 0DEC 4970 E272 A45F 78F3 61CB

To claim this, I am signing this object:

matthieu / gist:f18b54cb91c31d39ba54
Last active Aug 29, 2015
Validate the tosign data returned by BlockCypher
View gist:f18b54cb91c31d39ba54
# create the transaction
$ curl -d '{"inputs": [{"addresses": ["mtWg6ccLiZWw2Et7E5UqmHsYgrAi5wqiov"]}],
"outputs":[{"addresses": ["mzUqjgiGc3Mqh5zMiP5vXDNd7Hwx3K1xCU"], "value": 25000}]}' \
"tx": {
"block_height": -1,
"hash": "568acff13300b471d384e16a1a6d449be704e97b819f051dc4f1fb246726e471",
"addresses": [
View gist:4c98575af988f3e6b194
Verifying I am +matthieu on my passcard.
View gist:455329
package spike
import util.Random
class Neuron(nm: String, ns: List[Neuron], rnd: Random) {
val (a, b, rate) = (1.7159, 2.0/3.0, 0.1)
val dendrites = connect(ns)
val name = nm
// need to remember output and gather error for training
package dyn;
import org.objectweb.asm.*;
import org.objectweb.asm.util.TraceClassVisitor;
import sun.dyn.anon.AnonymousClassLoader;
public class Indy implements Opcodes {
matthieu / bc-contract-doc
Created Jul 12, 2016
Contract creation with BlockCypher
View bc-contract-doc
# The contract API includes the following endpoints (API token always required):
# POST /v1/eth/main/contracts
# Creates a new contract. Expects the solidity definition, the private key paying for the publication, the name of the
# contract to be published, the gas amount to use and eventual constructor parameters. The solidity code is compiled
# and the contract creation transaction built and broadcasted. Both the code and the ABI are saved for further
# retrieval. If invoked without contracts to publish, simply compiles and returns the result of compilation.
# Otherwise, along with the compilation results, will return the contract address and creation transaction hash and the
# contract methods will be exposed as endpoints (see below).
You can’t perform that action at this time.