Skip to content

Instantly share code, notes, and snippets.

@cceckman
cceckman / main.go
Created November 5, 2017 07:02
Show gist
// Demonstrate bug: spacer doesn't render its background color.
package main
import (
"log"
"github.com/marcusolsson/tui-go"
)
func Theme() *tui.Theme {
digraph G {
start -> v [label="Ctrl+X"] ;
start -> PRINT [label="Z"];
v -> QUIT [label="Ctrl+C"];
v -> start [label="ε"];
}
@cceckman
cceckman / main.go
Last active December 14, 2017 07:55
Embedding != inheritance. This is Go (not Java/Python/C++ with 'Foo' as a virtual method), so this outputs FooBar instead of CrowBar.
package main
import(
"fmt"
)
type FooBar struct {}
func (f *FooBar) Foo() string {
return "Foo"
@cceckman
cceckman / stitches.js
Created September 30, 2019 04:43
JS Stitch calculator
var inputs = {
swatch: {
stitches: 20,
length: 4 # Really any unit, as long as it's the same as target_length
},
pattern: {
multiple: 6,
plus: 2
},
target_length: 21 # Really any unit, as long as it's the same as swatch.length
@cceckman
cceckman / rm2-tailscale.sh
Created May 20, 2023 16:10
Tailscale setup for remarkable
#!/bin/sh
#
# Original: https://github.com/cceckman/homelab/blob/main/helpers/rm2-tailscale.sh
# I am the original author of this document and release it into the public domain.
# Go wild.
#
# This script enables [Tailscale] on a [reMarkable 2] tablet.
#
# Tailscale is run in [userspace networking] mode, so any outbound applications
# will need to be configured to proxy via tailscaled.