Skip to content

Instantly share code, notes, and snippets.

View lisa's full-sized avatar

Lisa Seelye lisa

View GitHub Profile
@lisa
lisa / README.md
Last active June 13, 2022 04:06
Adding a new control-plane node to an existing Kubernetes cluster

Adding a new control-plane node to an existing Kubernetes cluster

This document is meant to collect information from various sources to serve as a quick and dirty reminder to myself before ending up on lisa.dev

$ k get node -o wide
NAME         STATUS   ROLES                  AGE      VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                         KERNEL-VERSION     CONTAINER-RUNTIME
kube2        Ready    <none>                 2y338d   v1.22.8   192.168.86.11   <none>        Ubuntu 18.04.6 LTS               5.1.0-rockchip64   containerd://1.5.5
kube3        Ready    <none>                 2y338d   v1.22.8   192.168.86.12   <none>        Ubuntu 18.04.6 LTS               5.1.0-rockchip64   containerd://1.5.5
kube4        Ready    control-plane          8m45s    v1.24.1   192.168.86.13   <none>        Debian GNU/Linux 11 (bullseye)   5.15.32-v8+        containerd://1.4.13

A pair of helper scripts for Factorio blueprint (string) parsing.

Factorio blueprint strings are base64-encoded and zlib compressed JSON. There is a leading 0 which prefixes the blueprint string. Consider:

0eNp9j80KwjAQhN9lzmmhbWI0ryIibV0kkD+SVCwl725TL548zjLzzeyGySwUonYZaoOevUtQ1w1JP91o6i2vgaCgM1kwuNFWlexoTEOG5hz13ARvCIVBuwe9obpyYyCXddb0xR1ivbvFThR3w18QQ/Bpz3pX+ytvkLIVDCtUM/ChFaUWHIvUzwMML4rpiPXnjstLL4XgXMhTKR9Exkxi

The preceeding is a base64 encoded blueprint string for a single Small electric pole with no connections or anything else going on.

@lisa
lisa / README.md
Last active May 4, 2022 15:37
wiki in docker-compose

You will need to find the ParserFunctions and SimpleCalendar extensions and put them in .. You will also need to make the ./html_images and ./db directories

Also note that this is a much older version of Mediawiki than is current. It works for me, but it's up to you if you'd like to use a newer version.

A native, in-app way to restore files would be far better than needing to navigate to and login to select files.
The workflow to create a zip file in the website could be better: I totally get the 500GB limit, but I shouldn't be able to select files >500GB to receive that error, and if I did somehow, it should direct me to create a snapshot from those same files.
The backblaze downloader app requires logging in (with painful 2FA!) for each zip file. I should be able to select multiple zip files and snapshots. It's not really a backblaze "downloader" if it can't download all the things.
Snapshots: This whole process is a goddamn mess. I've tried for a week to fetch snapshots (ranging from multiple 500GB to a two over 3.9TB) and it's simply not gone well, which sucks because each attempt is costing real dollars.
I tried Cyberduck originally as suggested on backblaze website and that resulted in incomplete files and no way to resume. I've tried b2 3.3.0 to "sync" and it resulted in truncated files. I've trie
@lisa
lisa / settimeofday.go
Created September 13, 2017 19:09
settimeofday.go
package main
import (
"fmt"
"syscall"
"time"
)
func main() {
t := time.Now()
@lisa
lisa / stripansi.sh
Created September 26, 2021 16:48
Strip ANSI with Perl
#!/bin/bash
# An implementation of https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-stream/380778
# usage: ./stripansi.sh "src" "dest"
cat "${1}" | perl -pe 's/\x1b\[[0-9;]*[mG]//g' > "${2}"
@lisa
lisa / lisa.md
Last active July 6, 2021 17:11
You seem to have accidentally notified Lisa. Here's what to do next.

@lisa User Notification

Hello! You're receiving this notice because you've tagged me, @lisa, on GitHub, likely in error. Lisa is a common first name, and happens to be mine. I use the @lisa username here on GitHub. While being tagged in various repositories is an interesting way for me to discover new projects, it's likely not your intention. Did you mean to tag someone else? Did you mean to use @lisa instead, in a word as word usage?

Next Steps

I'm unsubscribing from this issue, pull request or project so if you meant to tag someone else to notify them, I would recommend that. If you meant to use my user ID as a plain string, without having GitHub notify me, you can do so by wrapping with backticks (the ` character), like so: @lisa.

this text

@lisa
lisa / README.md
Created June 5, 2020 02:14
Python-generated YAML meets Go Operators

This week I ran into a pretty weird bug that mashed up a confluence of a number of things:

  • Code changes
  • Separate, but related project that generates YAML (sigh, yaml)
  • JSON marshalling in Go
  • Kubernetes CRDs

How these all intertwine centres around the Kubernetes CRD and JSON marshalling.

Say you have a CRD and its API is:

1 Godless Shrine
3 Unearth
2 Snow-Covered Island
1 Marsh Flats
4 Serum Visions
2 Snow-Covered Swamp
1 Watery Grave
3 Monastery Mentor
4 Snapcaster Mage
3 Flooded Strand
At home stuff:
Bodyweight squats - http://www.fitstream.com/exercises/squat-a158
Bulgarian split squats (put the 1 foot on a chair) - https://www.youtube.com/watch?v=2C-uNgKwPLE
Reverse lunges - https://www.youtube.com/watch?v=xrPteyQLGAo
Bench dips (with a chair or sofa) https://www.youtube.com/watch?v=c3ZGl4pAwZ4
Lat pulldown (Use a towel) - https://www.youtube.com/watch?v=NfS_6HC4ryE
Rows (got something heavy with a handle? like kitty litter)
Bodyweight hip thrust https://bretcontreras.com/10-steps-to-the-perfect-hip-thrust/
Pushups (inclined maybe)