Skip to content

Instantly share code, notes, and snippets.

View stevegt's full-sized avatar

Steve Traugott stevegt

View GitHub Profile
@stevegt
stevegt / api.go
Created July 30, 2021 23:59
sketch of journal engine API
package tjournal
import (
"fmt"
)
// XXX get this from pitbase
type Addr string
// type Input fmt.Stringer
@stevegt
stevegt / simple-flow.dot
Last active August 9, 2021 00:14
simple engine flowchart
digraph g {
rankdir=LR;
io [label="I/O"];
subgraph cluster_20 {
label=journal;
open [label="open\nexisting\njournal"];
notify [label="start\nprocess"];
create [label="create\nnew\njournal"];
@stevegt
stevegt / simple-engine.dot
Last active July 30, 2021 19:39
simple engine data flow
digraph g {
rankdir=TB;
input;
gen [label="code\ngenerator"];
engine [shape=box3d];
external -> gen [label=input];
gen -> engine [label="statement"];
@stevegt
stevegt / graphviz-gist
Last active July 31, 2021 01:25
graphviz xdot and gist driver
#!/bin/bash -ex
# usage: graphviz-gist {filename} [optional description goes here]
# gist-paste is from the ubuntu 'gist' package
github_user=stevegt # XXX
id="$1"
shift
@stevegt
stevegt / global-journal-local-state.dot
Last active July 30, 2021 18:05
roles of global journal and local state
digraph g {
rankdir=TB;
subgraph cluster_5 {
label="inputs";
input1 -> input2 -> input3 [style=invis];
}
subgraph cluster_7 {
label="tests/consensus";
@stevegt
stevegt / test3.dot
Created July 29, 2021 23:42
testing
digraph g {
rankdir=TB;
subgraph cluster_5 {
label="inputs";
input1 -> input2 -> input3 [style=invis];
}
subgraph cluster_7 {
label="consensus";
@stevegt
stevegt / test3.dot
Created July 29, 2021 23:41
testing
digraph g {
rankdir=TB;
subgraph cluster_5 {
label="inputs";
input1 -> input2 -> input3 [style=invis];
}
subgraph cluster_7 {
label="consensus";
@stevegt
stevegt / test2.dot
Created July 29, 2021 23:41
testing
digraph g {
rankdir=TB;
subgraph cluster_5 {
label="inputs";
input1 -> input2 -> input3 [style=invis];
}
subgraph cluster_7 {
label="consensus";
testing gist revisions
line 2
@stevegt
stevegt / time-until-dow.go
Created May 18, 2021 14:39
time until next instance of day of week https://play.golang.org/p/fvZuHRYPTTw
package main
import (
"fmt"
"time"
"github.com/robfig/cron"
. "github.com/stevegt/goadapt"
)