Skip to content

Instantly share code, notes, and snippets.

@leebyron
Created November 5, 2020 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leebyron/cbda7f0c604915d9200af5626b1fcf1b to your computer and use it in GitHub Desktop.
Save leebyron/cbda7f0c604915d9200af5626b1fcf1b to your computer and use it in GitHub Desktop.
Assigning terms for initial GraphQL TSC members
// Initial members of the TSC
const members = [
"andimarek",
"benjie",
"dschafer",
"ivangoncharov",
"jbaxleyiii",
"mjmahone",
"nyteshade",
"robzhu",
"sachee",
"schrockn",
];
// Seeded random function
let seed = 0x5eed;
function random() {
let t = (seed += 0x6d2b79f5);
t = Math.imul(t ^ (t >>> 15), t | 1);
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
return ((t ^ (t >>> 14)) >>> 0) / 0xffffffff;
}
// Fisher-Yates / Durnsten-Knuth shuffle
for (let i = members.length - 1; i > 0; i--) {
const j = Math.floor(random() * (i + 1));
[members[i], members[j]] = [members[j], members[i]];
}
// Assign terms, 5 have an shorter initial 1-year term, 5 a typical 2 year term.
const terms = members.map(
(member, index) =>
`${members[index]}\tfirst term ends ${
index < 5 ? "Dec 31, 2021" : "Dec 31, 2022"
}`
);
// Print all terms in same alpha order.
for (const term of terms.sort()) {
console.log(term);
}
andimarek first term ends Dec 31, 2022
benjie first term ends Dec 31, 2021
dschafer first term ends Dec 31, 2022
ivangoncharov first term ends Dec 31, 2021
jbaxleyiii first term ends Dec 31, 2021
mjmahone first term ends Dec 31, 2021
nyteshade first term ends Dec 31, 2021
robzhu first term ends Dec 31, 2022
sachee first term ends Dec 31, 2022
schrockn first term ends Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment