Skip to content

Instantly share code, notes, and snippets.

View tjstebbing's full-sized avatar
🐝
.go .py .js .vim

Timothy Stebbing tjstebbing

🐝
.go .py .js .vim
View GitHub Profile
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
#!/bin/bash
counter=0
while true; do
NEXT=$(date -v +1H +%H:00)
tclock -c darkgray countdown -t "$NEXT" -T "worked $counter hours"
read -p "Start the next hour? (y/n): " yn
case $yn in
[Yy]*) echo "Continuing..." ;;
[Nn]*)
echo "Exiting..."

ssh-keygen -Y sign -f ~/.radicle/keys/radicle -n "my@id"

#!/bin/bash

PHRASE="Hello! I might be a DID"
echo "$PHRASE" | ssh-keygen -Y sign -f ~/.radicle/keys/radicle -n "my@id" > test.sig

echo "my@id $(cat ~/.radicle/keys/radicle.pub)" > allowed_keys
@tjstebbing
tjstebbing / blogpost.md
Last active May 8, 2023 11:54
First test blogpost using gist as the source and hugo to publish

+++ categories = ['hax'] date = '2023-05-08' description = 'Hugo + gist + sh' slug = 'gist-powered-blog' title = 'Gist + Hugo + Bash Blog' +++

Over the past few weeks I've been noodling around setting up this website in my spare time. I have a lot to say personally about the work that I'm doing that isn't really appropriate from my [employers

+++ categories = ['hax'] date = '2021-08-12' description = 'Generate deterministic passwords on the command line' slug = 'deterministic-passwords' title = 'Generate deterministic passwords on the command line' +++

Simple method for creating deterministic passwords on the commandline

const fnCache: { [key: string]: any } = {}
function scriptValue(input: string, args: { [key: string]: any }): Function {
let params: string[] = []
let vals: any[] = []
for (let k in args) {
params.push(k)
vals.push(args[k])
}
let keys = params.join(',')
let fnKey = keys + input
@tjstebbing
tjstebbing / blogpost_roadmaps_and_changelogs.md
Last active May 8, 2023 13:00
The Roadmap to Changelogs

+++ categories = ['thinks'] date = '2021-01-03' description = 'roadmap and changelog file' slug = 'roadmap-to-changelogs' title = 'The Roadmap to Changelongs' +++

The Roadmap to Changelogs

+++ categories = ['thinks'] date = '2019-11-27' description = 'Perfection vs Pragmatism' slug = 'perfection-vs-pragmatism' title = 'Walking the Tightrope: Perfection vs Pragmatism' +++

Walk the Tightrope: Perfection vs Pragmatism

  • Every engineer wants their service / function / foo to be great, pure engineering pefection.
@tjstebbing
tjstebbing / Makefile
Created March 11, 2019 11:47
golang makefile
VERSION ?=0.0.1
BUILD_TIME :=$(date -u '+%Y-%m-%d_%I:%M:%S%p')
BRANCH :=`git rev-parse --abbrev-ref HEAD`
COMMIT :=`git rev-parse HEAD`
LDFLAGS=-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILD_TIME} -X main.COMMIT=${COMMIT} -X main.BRANCH=${BRANCH}"
BINARY :="surge"
default: build/sitemap.xml
@tjstebbing
tjstebbing / pidgeonhole.md
Last active February 28, 2019 06:51
pidgeonhole

weird idea for a public facing key-value store with delete-on-read and TTL

pdgnhol is an anonymous key-value store with limited free public access and extended paid access.

Create some data, get a key back

> echo 'Hi there this is the data that was stored, it's now been deleted, thanks for picking up your parcel!' | curl -X POST example.com/new
url: https://example.com/9e86a3b3-46fe-4eb1-a434-172f32e1055b
access-key: 9e86a3b3-46fe-4eb1-a434-172f32e1055b
edit-key: 573a838e-3210-4360-b7ba-0cedb8a3c0fa