Skip to content

Instantly share code, notes, and snippets.

Avatar

Bill Broadley spikebike

View GitHub Profile
View gist:7f26cba6db345ab69c497415ce1fc8e9
Wow, everytime I think I'm done. I find another hurdle.
Client and server are identical for my uses. So both client and server
should track the public key of their peers. So Server/Client handshake
can track who I'm talking to, last time I saw them, IP address, and public key.
Now when an RPC call is made I want to use UnaryServerInterceptor and
StreamServerInterceptor to allow every call to check if the Peer has
been tracked, if not look up the public key and set the PeerID.
peerID, ok := ctx.Value(peerIDKey).(int)
View keybase.md

Keybase proof

I hereby claim:

  • I am spikebike on github.
  • I am broadley (https://keybase.io/broadley) on keybase.
  • I have a public key whose fingerprint is B02D 3D10 B88A EC20 B774 BE18 C215 0DB0 77E1 EDEA

To claim this, I am signing this object:

View gist:2613c155263cad92d7331b511dc67472
[ 0.000000] Machine model: Raspberry Pi 2 Model B
1GB ram version,
root@raspberrypi:~# openssl speed
Doing md4 for 3s on 16 size blocks: 1056069 md4's in 3.00s
Doing md4 for 3s on 64 size blocks: 885899 md4's in 3.00s
Doing md4 for 3s on 256 size blocks: 574828 md4's in 3.00s
Doing md4 for 3s on 1024 size blocks: 237714 md4's in 3.00s
Doing md4 for 3s on 8192 size blocks: 36889 md4's in 3.00s
View gist:6dfe54fc620f7da5fd82
IPFS = short description
Installation = cut/paste commands to download and install ipfs
bootstap = init, where config file is, ipfs daemon
View WEB UI
add single file
view single file elsewhere
view single file via gateway
add directory
view dir in IPFS
view dir in fuse
View seconds_example.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
/* crude wall clock time keeping, returns a double of seconds */
double
seconds()
{
struct timeval tp;
struct timezone tzp;
@spikebike
spikebike / bdr_proto.proto
Created Apr 18, 2012 — forked from kylelemons/bdr_proto.proto
example for protobuf, go, and the repeated protobuf entry
View bdr_proto.proto
package bdr_proto;
message request {
message blob {
required string hash = 1; // the sha256 checksum of the blob
required int32 size = 2; // the size of the blob
}
repeated blob blobs = 1;
}
@spikebike
spikebike / bdr_proto.proto
Created Apr 18, 2012
example for protobuf, go, and the repeated protobuf entry
View bdr_proto.proto
package bdr_proto;
message request {
message blob {
required string sha256 = 1; // the sha256 checksum of the blob
required int32 bsize = 2; // the size of the blob
}
repeated blob blobarray= 1;
}
@spikebike
spikebike / bdr_proto.pb.go
Created Apr 17, 2012
Attempt to get go, go-protobuf and repeated records working.
View bdr_proto.pb.go
package bdr_proto
import proto "code.google.com/p/goprotobuf/proto"
import "math"
// Reference proto and math imports to suppress error if they are not otherwise used.
var _ = proto.GetString
var _ = math.Inf
type Request struct {
@spikebike
spikebike / add.go
Created Apr 4, 2012
Broken TLS + AddService for go-rpcgen
View add.go
ackage main
import (
"flag"
"log"
"net"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"./addservice"
@spikebike
spikebike / add.go
Created Apr 4, 2012
Add service for go-rpcgen
View add.go
package main
import (
"flag"
"log"
"./addservice"
)
var (