This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"flag" | |
"fmt" | |
"html" | |
"io" | |
"io/ioutil" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tailscale up | |
tailscale up --auth-key=xxxx | |
FIX: | |
tailscale up --advertise-tags=tag:foo | |
tailscale up --advertise-tags=tag:foo --shields-up=true | |
tailscale up --advertise-tags= --shields-up=true # explicitly mentioned good | |
tailscale up --shields-up=true # ERROR: unmentioned thing is changing value | |
tailscale up [--init] --advertise-tags= --shields-up=true # init is fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// homerunner is Brad's shitty Docker wrapper after he got tired of running | |
// HA nine-VM Kubernetes clusters. Earlier versions of this tried to use podman | |
// and fancy cloud-init and CNI stuff but then I decided to go to the other | |
// extreme and write something super specific to what I need and super dumb: | |
// run my containers from gcr.io, and use my home Ceph cluster for mounts/state. | |
// | |
// This primarily runs Home Assistant, HomeSeer, an MQTT server, and some cameras. | |
// And some omitted misc stuff. | |
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "net" | |
#Policy | |
#Policy: { | |
ACLs: [...#ACLRow] | |
Groups: #Groups | |
Hosts: #Hosts | |
TagOwners: [#TagName]: [...#TagOwner] | |
Tests: [...#ACLTest] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sqlite3 | |
sqlite> .mode csv | |
sqlite> .import brad-2016-2020.csv items | |
sqlite> .import brad-2021-ytd.csv items | |
sqlite> .mode column | |
sqlite> .width 40 | |
sqlite> .header on | |
sqlite> CREATE VIEW money_cat AS select Category, sum(Cast(Ltrim("Item Total", "$") as decimal)) as "Sum", count(*) from items group by Category; | |
sqlite> select category, round(100 * sum / (select sum(sum) from money_cat), 2) as "percent", "count(*)" from money_cat order by 2 desc limit 50; | |
Category percent count(*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
cd $HOME | |
rm -rf netstack.bare netstack | |
git clone --bare $HOME/gvisor netstack.bare | |
cd netstack.bare |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE Space (Func varchar, Pkg varchar, What varchar, Size int64); | |
BEGIN TRANSACTION; | |
INSERT INTO Space VALUES ("go.buildid", "", "pcsp", 0); | |
INSERT INTO Space VALUES ("go.buildid", "", "pcfile", 0); | |
INSERT INTO Space VALUES ("go.buildid", "", "pcln", 0); | |
INSERT INTO Space VALUES ("go.buildid", "", "text", 112); | |
INSERT INTO Space VALUES ("go.buildid", "", "funcname", 11); | |
INSERT INTO Space VALUES ("internal/cpu.Initialize", "internal/cpu", "pcsp", 13); | |
INSERT INTO Space VALUES ("internal/cpu.Initialize", "internal/cpu", "pcfile", 5); | |
INSERT INTO Space VALUES ("internal/cpu.Initialize", "internal/cpu", "pcln", 21); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Got: {Magic:4277009103 Cpu:CpuArm64 SubCpu:0 Type:Exec Ncmd:29 Cmdsz:4528 Flags:2097285} | |
38 sections: | |
[0] {Name:__text Seg:__TEXT Addr:4294989976 Size:2401076 Offset:22680 Align:3 Reloff:0 Nreloc:0 Flags:2147484672} | |
[1] {Name:__gopclntab Seg:__DATA Addr:4298890048 Size:1821374 Offset:3922752 Align:5 Reloff:0 Nreloc:0 Flags:0} | |
[2] {Name:__rodata Seg:__DATA Addr:4297462176 Size:1417021 Offset:2494880 Align:5 Reloff:0 Nreloc:0 Flags:0} | |
[3] {Name:__noptrdata Seg:__DATA Addr:4300711456 Size:131552 Offset:5744160 Align:5 Reloff:0 Nreloc:0 Flags:0} | |
[4] {Name:__bss Seg:__DATA Addr:4300843008 Size:120184 Offset:0 Align:5 Reloff:0 Nreloc:0 Flags:1} | |
[5] {Name:__data Seg:__DATA Addr:4297414624 Size:47341 Offset:2447328 Align:5 Reloff:0 Nreloc:0 Flags:0} | |
[6] {Name:__noptrbss Seg:__DATA Addr:4300963200 Size:12520 Offset:0 Align:5 Reloff:0 Nreloc:0 Flags:1} | |
[7] {Name:__typelink Seg:__DATA Addr:4298879200 Size:8624 Offset:3911904 Align:5 Reloff:0 Nreloc:0 Flags:0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
./udp-on.sh | |
iptables -A INPUT -p udp --sport 53 -j ACCEPT | |
iptables -A INPUT -p udp -j DROP | |
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# restart wish \ | |
exec wish "$0" "$@" | |
# | |
# LiveJournal -- TCL/Tk client | |
# http://www.livejournal.com/ | |
# | |
# Brad Fitzpatrick | |
# [email protected] |