Skip to content

Instantly share code, notes, and snippets.

View mbwhite's full-sized avatar

Matthew B White mbwhite

View GitHub Profile
@mbwhite
mbwhite / OneName
Created January 15, 2016 12:16
OneName
Verifying that +calanais is my blockchain ID. https://onename.com/calanais
toHex(str) {
let hex = '';
for(let i=0;i<str.length;i++) {
let s = str.charCodeAt(i).toString(16);
hex += (s.length===1 ? '0' : '')+ str.charCodeAt(i).toString(16)+ ' ';
}
return hex;
}
@mbwhite
mbwhite / Write-up of the starter-kit.md
Last active May 15, 2018 14:20
Write-up of the starter-kit

Notes on the dev experience

Based on the (continued) developing of the Commercial Paper stack

API Notes

let selected = {};
let ready = (callback) => {
// in case the document is already rendered
if (document.readyState != 'loading') callback();
// modern browsers
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);
// IE <= 8
else document.attachEvent('onreadystatechange', function () {
@mbwhite
mbwhite / Notes.md
Last active April 19, 2019 08:18
Leon on Raspberry PI
@mbwhite
mbwhite / metadata.ts
Created May 10, 2019 09:11
Example client app to get data from Hyperledger Fabric Contract
/*
SPDX-License-Identifier: Apache-2.0
*/
/**
* Client application to get the metadata from a deployed Fabric Contract.
*
* Good example of the essentials of connecting a client to Fabric, and how to
* issue a simple transaction. As this is an 'evaluate' transaction (i.e. nothing is
* committed to the ledger) it is also a useful 'ping' transactions. All chaincode's start
@mbwhite
mbwhite / notes.md
Created August 23, 2019 07:48
Running Chaincode in Dev move

Node.js - example script in package.json

 "start:dev": "CORE_CHAINCODE_LOGGING_SHIM=debug fabric-chaincode-node start --peer.address=localhost:7052 --chaincode-id-name hellonet:1"

sudo yum install gcc-c++ make


# get the nvm installer for node.js
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# (restart the terminal app to get this added to your shell path)
@mbwhite
mbwhite / JavaChaincodeQuickStart.md
Created October 14, 2019 10:59
Draft of QuickStart with Fabric Java Chaincode

Quick Start - Java Chaincode

Aim: to get up and working with Java Chaincode as quick as possible. Also as a sanity check that everything is setup correctly.

Assumptions

That you have:

  • git installed
  • docker and docker-compose installed
@mbwhite
mbwhite / dashboard.json
Last active October 21, 2019 16:08
Java Chaincode Grafanna Dashboard (WIP)
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",