Skip to content

Instantly share code, notes, and snippets.

Carol (Nichols || Goulding) carols10cents

Block or report user

Report or block carols10cents

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dig
$ 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 Dec 2, 2019
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 Oct 31, 2018 — 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
fn main() {
let s = String::from("book");
// Add code here that calls the pluralize function
"I have one {}, you have two {}",
View gist:b29aef239f0264e96dd3939a5531cae3

I currently have this working diesel code:

    let recent_downloads = sql::<Nullable<BigInt>>("SUM(crate_downloads.downloads)");
    let most_recently_downloaded = crates
                .and( - 90.days())))),
carols10cents /
Created Dec 3, 2017
Morgantown codes abstract

What is this Rust thing anyway?

Rust is a new systems programming language out of Mozilla research aiming to be a safer alternative to C and C++ without sacrificing performance. Come learn how Rust prevents buffer overflows, ensures memory safety, and prevents data races while also providing modern development workflows through Cargo and an ever-growing ecosystem of open source libraries on Hear about how companies like Mozilla, npm, Dropbox, and Chucklefish are using Rust to make better software. Discover how you can get involved with Rust's friendly community!

View gist:cc1009a3cc29a5a11790f68a12d88410
curl '' -H 'Accept: application/vnd.github.v3+json' -H 'User-Agent: hello!' -H 'Authorization: token INSERTTOKENHERE'
carols10cents / output.json
Created Sep 26, 2017
Part of the output of `cargo build --message-format=json` for a project with `src/bin/`
View output.json
"package_id":"cargo-registry 0.2.1 (path+file:///Users/carolnichols/rust/",
View gist:114003a9a80409dcc2dc0dce06108346
{GenServer, :call,
{:synthesize_commit, {{:installation, 42672}, 21365581},
{%{branch: "staging.tmp", commit_message: "[ci skip]",
parents: ["314f793078cf83b535700686fd12e47ceee4b0c3"],
tree: "c4b1dd792ff25424a26818434dcfa6df68c9070b"}}},
View gist:48e495198f329e52f74978c59b094581
select count(distinct crate_owners.owner_id)
from crates
join crate_owners
on = crate_owners.crate_id
where date(crates.created_at) >= '2016-05-15'
and crate_owners.owner_id NOT IN (
select distinct crate_owners.owner_id
from crates
join crate_owners
on = crate_owners.crate_id
You can’t perform that action at this time.