This file contains 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 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 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 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 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 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 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 | |
# livejournal@bradfitz.com |
This file contains 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 ( | |
"flag" | |
"fmt" | |
"runtime" | |
) | |
func main() { | |
var cpus = flag.Int("cpus", runtime.NumCPU()*2, "number of threads to spin") |
This file contains 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 ( | |
"bytes" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"time" | |
) | |
This file contains 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
root@kc1b:~# iptables-legacy-save | |
# Generated by iptables-save v1.8.2 on Sun Sep 8 09:23:15 2019 | |
*raw | |
:PREROUTING ACCEPT [88168023:13613243271] | |
:OUTPUT ACCEPT [86121993:13224156217] | |
:CILIUM_OUTPUT_raw - [0:0] | |
:CILIUM_PRE_raw - [0:0] | |
-A PREROUTING -m comment --comment "cilium-feeder: CILIUM_PRE_raw" -j CILIUM_PRE_raw | |
-A OUTPUT -m comment --comment "cilium-feeder: CILIUM_OUTPUT_raw" -j CILIUM_OUTPUT_raw | |
-A CILIUM_OUTPUT_raw ! -s 10.217.0.29/32 -m mark --mark 0xa00/0xfffffeff -m comment --comment "cilium: NOTRACK for proxy return traffic" -j NOTRACK |