Skip to content

Instantly share code, notes, and snippets.

View shemnon's full-sized avatar

Danno Ferrin shemnon

View GitHub Profile

Background

See my public key blockchain patent for background: us patents 9,973,341 and 10,187,214

Technical Foundations

Traditional Blockchain

A traditional block has a purpose built container for the data structure for the block. Containing a previous block reference, bookkeeping data, the payload, and a nonce.

@shemnon
shemnon / metrics_help.txt
Created January 14, 2020 23:50
Mechanical dump of all of the Besu metrics
# HELP besu_blockchain_chain_head_gas_limit Block gas limit of the current chain head block
# TYPE besu_blockchain_chain_head_gas_limit gauge
# HELP besu_blockchain_chain_head_gas_used Gas used by the current chain head block
# TYPE besu_blockchain_chain_head_gas_used gauge
# HELP besu_blockchain_chain_head_ommer_count Number of ommers in the current chain head block
# TYPE besu_blockchain_chain_head_ommer_count gauge
# HELP besu_blockchain_chain_head_timestamp Timestamp from the current chain head
# TYPE besu_blockchain_chain_head_timestamp gauge
# HELP besu_blockchain_chain_head_transaction_count Number of transactions in the current chain head block
# TYPE besu_blockchain_chain_head_transaction_count gauge

Keybase proof

I hereby claim:

  • I am shemnon on github.
  • I am shemnon (https://keybase.io/shemnon) on keybase.
  • I have a public key ASBNEdzfIW-Xa0wD3BPkbLZllwz8_CJVvu6Q0FYCTB8LBwo

To claim this, I am signing this object:

@shemnon
shemnon / TextToBip44.java
Last active March 7, 2019 04:57
Utility to extract a Bip44 key phrase from any text document, talking the first 12 words in the document that are also bip44 seed words.
package tech.pegasys.benchmark;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
@shemnon
shemnon / log4j2-rollingdebug.xml
Created December 12, 2018 17:45
Pantheon Log4J rolling debug to a file
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
<Properties>
<Property name="root.log.level">DEBUG</Property>
</Properties>
<Appenders>
<RollingFile name="RollingFile" fileName="debug.log"
filePattern="debug-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg%n"/>
@shemnon
shemnon / DemoClass.java
Last active October 4, 2018 15:10
Comparison of property access patterns and JVM language integrations.
package com.example.java;
public class DemoClass {
public String fieldProperty = "init";
private String _cppProperty = "init";;
private String _javaProperty = "init";;
public String cppProperty() {
return _cppProperty;
#!/usr/bin/env python
import time
import RPi.GPIO as GPIO
# set MAXM race time, times out after this if all cars don't finish
max_race_time = 20
#set input gpio pin numbers
LaneOne = 16 #GPIO23
LaneTwo = 18 #GPIO24
@shemnon
shemnon / Id.java
Last active August 29, 2015 14:02 — forked from posita/Id.java
/*======================================================================*\
ICBIaW50OiBtYWtlIHRoaXMgYXMgY2xvc2UgdG8gcHJvZHVjdGlvbi1yZWFkeSBzb3VyY2
UgY29kZSBhcyB5b3UgY2FuIQ0KICANCiAgQm9udXMgcG9pbnRzIGZvciB0ZWxsaW5nIHVz
IHdoYXQgdGhpcyBkb2VzOg0KDQogICAgJycuam9pbihpdGVydG9vbHMuY2hhaW4oKnppcC
hzWy0yOjotMl0sIHNbOjotMl0pKSkNCg0KPj4gSXQgcmV2ZXJzZXMgdGhlIHN0cmluZyBp
biBwYWlycy4gIA0KPj4gSWYgdGhlIHN0cmluZyBpcyBvZGQgbGVuZ3RoIHRoZW4gdGhlIG
ZpcnN0IGNoYXJhY3RlciBpcyByZXZlcnNlZC4gIFRoZW4gZWFjaCBjaGFyYWN0ZXIgaXMg
cGFpcmVkLCB0aGVuIHRoZSBwYWlycyBhcmUgcmV2ZXJzZWQuDQoNCiAgKlN1cGVyKiBib2
51cyBwb2ludHMgZm9yIGZpbmQgdGhlIGJ1ZyBpbiB0aGlzIGNvZGU6DQogIA0KICAgIGh0
dHA6Ly9wYXN0ZS5wb3VuZC1weXRob24ub3JnL3Nob3cvdTE2eFVSS1JGWnVOaHdzV214SU
@shemnon
shemnon / ColoredTextRow.java
Created November 20, 2013 04:01
Color text backgrounds
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
/**
* Created by shemnon on 19 Nov 2013.
*/
@shemnon
shemnon / gist:5552255
Last active December 17, 2015 04:39
SwingNode: A JTable in a JavaFX Stage
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.TimelineBuilder;
import javafx.application.Application;
import javafx.embed.swing.*;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;