Synopsis:
(Assume postgres is running on localhost.)
$ go run . &
$ psql "host=127.0.0.1 port=5555 sslmode=disable user=... password=..."
| module gist.github.com/spraints/42b3ec473655ce665f8c215bf6dcfe5e | |
| go 1.22.2 | |
| require ( | |
| github.com/vishvananda/netlink v1.3.0 // indirect | |
| github.com/vishvananda/netns v0.0.4 // indirect | |
| golang.org/x/sys v0.10.0 // indirect | |
| ) |
| #/ Usage: ruby run.rb [--resume] runlist.txt outdir | |
| #/ | |
| #/ --resume picks up after a gracefully shut down previous attempt. | |
| #/ | |
| #/ outdir must not exist, but be a path where we can create a directory. | |
| #/ | |
| #/ runlist.txt must be a list of the inputs we're going to process, once per line. | |
| require "fileutils" |
| sigset-die | |
| sigset-live |
| #/ Usage: ruby recent-growth.rb [OPTIONS] | |
| #/ --git-dir <git_dir> | |
| #/ --since <date> | |
| #/ --until <date> | |
| #/ --max-count <count> | |
| #/ --per tree|extension | |
| #/ --list-all (in the summary, show all trees / extensions, not just the top 10) | |
| #/ --all | --branches | --tags | --remotes | <commit> | |
| #/ | |
| #/ Example: |
| /* | |
| goos: darwin | |
| goarch: amd64 | |
| pkg: github.com/github/gitrpcd/spraints/mutexvsatomic | |
| cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz | |
| BenchmarkMutex-16 2182556 544.1 ns/op | |
| --- BENCH: BenchmarkMutex-16 | |
| compare_test.go:71: maxes: [2 2 2 2 2 2 2 2 2 2] | |
| compare_test.go:71: maxes: [2 2 2 2 2 2 2 2 2 2] |
| int red = 11; | |
| int green = 10; | |
| int blue = 9; | |
| long spectrum[] = { | |
| 0xff0000, // 0 red | |
| 0xffa500, // 1 orange | |
| 0xffff00, // 2 yellow | |
| 0x00ff00, // 3 green | |
| 0x0000ff, // 4 blue |
| *.o | |
| show-maxrss | |
| bloat-fe |
| # Usage: ruby extract.rb PDF... | |
| # | |
| # Extracts all 'stream' blocks from the PDF. This includes all images embedded | |
| # in it. All of the output files have a '.bin' extension. Sometimes you can see | |
| # what they are by doing something like this: | |
| # | |
| # $ ruby extract.rb example.pdf | |
| # $ file *.bin | |
| def main |
| package sharedcertprovider | |
| import ( | |
| "context" | |
| "sync" | |
| "time" | |
| ) | |
| type Provider interface { | |
| GetCert() Cert |