Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
curl -vL
* Trying [2600:9000:2508:3800:c:7ed3:240:93a1]:443...
* Connected to (2600:9000:2508:3800:c:7ed3:240:93a1) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
$ docker run -it --rm -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one --log-level=debug
2022/10/20 19:35:47 maxprocs: Leaving GOMAXPROCS=5: CPU quota undefined
{"level":"info","ts":1666294547.076985,"caller":"flags/service.go:119","msg":"Mounting metrics handler on admin server","route":"/metrics"}
{"level":"info","ts":1666294547.0770223,"caller":"flags/service.go:125","msg":"Mounting expvar handler on admin server","route":"/debug/vars"}
{"level":"info","ts":1666294547.0771093,"caller":"flags/admin.go:129","msg":"Mounting health check on admin server","route":"/"}
{"level":"info","ts":1666294547.0771375,"caller":"flags/admin.go:143","msg":"Starting admin HTTP server","http-addr":":14269"}
{"level":"info","ts":1666294547.0771465,"caller":"flags/admin.go:121","msg":"Admin server started","":"[::]:14269","health-status":"unavailable"}
{"level":"info","ts":1666294547.0780103,"caller":"memory/factory.go:66","msg":"Memory storage initialized","configuration":{"MaxTraces":0}}
Uploading carol-test v2.2.2 (/private/tmp/poop/carol-test)
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * Trying
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * Connected to ( port 443 (#0)
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * ALPN, offering h2
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * ALPN, offering http/1.1
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * successfully set certificate verify locations:
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * CAfile: /etc/ssl/cert.pem
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * CApath: none
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * (304) (OUT), TLS handshake, Client hello (1):
[2022-10-14T20:46:52Z DEBUG cargo::ops::registry] http-debug: * (304) (IN), TLS handshake, Server hello (2):
SELECT, created_date, num_versions
SELECT crate_id, date_trunc('day', versions.created_at) AS created_date, count(1) as num_versions
FROM versions
GROUP BY crate_id, created_date
HAVING count(1) > 10
) AS foo
INNER JOIN crates ON foo.crate_id =
ORDER BY num_versions DESC
carols10cents / crates-many-versions.txt
Created October 8, 2022 02:37
Crates that have ever had a day publishing more than 10 versions
carols10cents / gist:58a4fcf4ab4e1483ad5b4e4f5c01b0f8
Created December 17, 2021 15:37
rustc debugging logs of evaluate_obligation
┐rustc_trait_selection::traits::query::evaluate_obligation::evaluate_obligation obligation=Obligation(predicate=Binder(TraitPredicate(<std::future::from_generator::GenFuture<[static gener
ator@src/ 589:2]> as std::marker::Send>, polarity:Positive), []), depth=9)
├─0ms DEBUG rustc_query_system::query::plumbing ty::query::get_query<evaluate_obligation>(key=Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVar
Info { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(OutlivesPredicate(ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrAnon(0) }), ReL
ateBound(DebruijnIndex(1), BoundRegion { var: 1, kind: BrAnon(1) })), []), Binder(OutlivesPredicate(S14, ReLateBound(DebruijnIndex(1), BoundRegion { var: 1, kind: BrAnon(1) })), [])], rev
eal: UserFacing, constness: NotConst }, value: Binder(TraitPredicate(<std::future::from_generator::GenFuture<[static generator@src/ 589:2]> as std::marker::Send>, pola
carols10cents / gist:89900a262c57ce812ee7fd00030aee0f
Created November 18, 2021 20:22
Building 2 crates that depend on the same features of tokio; tokio gets recompiled. All log lines that contain "tokio"
❯ CARGO_LOG=cargo::core::compiler::fingerprint=trace cargo test -v -p client_util
[2021-11-18T19:39:02Z DEBUG cargo::core::compiler::fingerprint] old local fingerprints deps "/Users/carolnichols/.cargo/registry/src/" precalculated="1.14.0"
[2021-11-18T19:39:02Z DEBUG cargo::core::compiler::fingerprint] failed to get mtime of "/Users/carolnichols/rust/influxdb_iox/target/debug/build/tokio-5758515f8236298f/build_script_build-5758515f8236298f": failed to stat `/Users/carolnichols/rust/influxdb_iox/target/debug/build/tokio-5758515f8236298f/build_script_build-5758515f8236298f`
[2021-11-18T19:39:02Z DEBUG cargo::core::compiler::fingerprint] failed to get mtime of "/Users/carolnichols/rust/influxdb_iox/target/debug/build/tokio-b5b44448e013bb01/output": failed to stat `/Users/carolnichols/rust/influxdb_iox/target/debug/build/tokio-b5b44448e013bb01/output`
[2021-11-18T19:39:02Z DEBUG cargo::core::compiler::fingerprint] max output mtime for "/Users/carolnichols/.cargo/registry/s
$ dig -t ns
; <<>> DiG 9.10.6 <<>> -t ns
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25517
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
; EDNS: version: 0, flags:; udp: 512
carols10cents /
Last active December 2, 2019 19:17
Current and proposed crate publish procedure in diff format



  • We enforce a 50MB max in nginx
  • We should add a configuration entry for the global max size of the metadata (we currently use max tarball size several places)
  • A few guidelines I tried to follow:
    • Identify and reject invalid requests as quickly as possible.
    • Minimize the work done while holding a database connection, especially after entering the main transaction.
  • The final main transaction may need to repeat some queries to ensure it doesn't rely on data obtained outside of the transaction.
carols10cents /
Last active October 31, 2018 00:18 — forked from rust-play/
Code shared from the Rust Playground
fn save_status(text: &str) -> Result<i64, &'static str> {
if text.len() > 200 {
return Err("status is too long, must be under 200 bytes");
let id = save_to_database(text)?;
// log id to server logs