Skip to content

Instantly share code, notes, and snippets.

View lukechampine's full-sized avatar

Luke Champine lukechampine

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lukechampine on github.
  • I am lukechampine (https://keybase.io/lukechampine) on keybase.
  • I have a public key whose fingerprint is 99C2 18A7 FA3C C119 562B D6C5 A5C1 CE07 4CBF 1D60

To claim this, I am signing this object:

@lukechampine
lukechampine / explore.go
Created April 4, 2017 20:09
Helper for exploring patterns in the Sia blockchain
package main
import (
"encoding/json"
"io/ioutil"
"log"
"os"
"github.com/NebulousLabs/Sia/encoding"
"github.com/NebulousLabs/Sia/persist"
@lukechampine
lukechampine / cold.go
Created October 4, 2017 16:05
Cold wallet address generator
package main
import (
"bufio"
"fmt"
"log"
"os"
"strconv"
"github.com/NebulousLabs/Sia/crypto"
[alias]
au = add -u .
c = commit -m
ca = commit --amend
can = commit --amend --no-edit
cf = commit --fixup
co = checkout
cob = checkout -b
com = checkout master
cp = cherry-pick
# ssh config to connect to a host via local network if available.
#
# For example, if the host is 192.168.1.10 on your local network,
# first run ssh-keyscan 192.168.1.10 to see what keys are available,
# then substitute that key for your_host_key (-t selects the key type).
Match exec "ssh-keyscan -T 1 -t ed25519 local.ip.for.host 2>/dev/null | grep -F your_host_key" host yourhostname
Hostname local.ip.for.host
Port 22

how to into git (and GitHub)

This is a handy reference for setting up and using git to contribute to projects on GitHub. It is by no means a complete guide to using git; use http://gitref.org for that.

Update: This site provides some excellent visualizations of what various git commands do. Highly recommended.

basics

setup

First run the following commands, using your real name and GitHub email address:

@lukechampine
lukechampine / fuzzseed.go
Created January 31, 2018 00:34
Find the one word missing from a seed
package main
import (
"bufio"
"fmt"
"log"
"os"
"strings"
"github.com/NebulousLabs/Sia/modules"
@lukechampine
lukechampine / fractran.hoon
Created May 13, 2020 05:08
A FRACTRAN interpreter in Hoon
|= n=@
=<
|^
(fib-dec (interp fib-prog (fib-enc n)))
++ fib-prog
:~ 17^65
133^34
17^19
23^17
2.233^69
@lukechampine
lukechampine / a.c
Created October 19, 2014 01:00
a.c (with a.h expanded)
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<sys/mman.h>
typedef void V;typedef int I;typedef double F;typedef unsigned char C,*S;typedef long L;
#define O printf
#define R return
#define I(a...) if(a)
#define W(a...) while(a)
@lukechampine
lukechampine / bnt.go
Last active October 2, 2023 03:22
BNT renderer
package main
import (
"fmt"
)
func main() {
fmt.Println(renderBNT(19))
}