Skip to content

Instantly share code, notes, and snippets.

Avatar

Natalie Weizenbaum nex3

View GitHub Profile
View main.dart
// The total number of cards in the cube.
const C = 540;
// The number of piles to create.
const p = 8;
void main() {
var indices = [
for (var i = 0; i < p; i++) ...List.filled((C / p).floor(), i + 1),
// Randomly assign the last C % p numbers to piles without
View sass-embedded.js
import * as sassEmbedded from 'sass-embedded';
// Spawns the embedded compiler, returns an object with the Node Sass API.
const sass = sassEmbedded.start();
sass.renderSync({data: 'a {b: c}'});
// Shuts down the embedded compiler, future calls to render et al now throw.
sass.close();
@nex3
nex3 / input.scss
Created Apr 9, 2021
Generated by SassMeister.com.
View input.scss
@use 'sass:string';
@mixin declare-toggle-var($variable, $toggle) {
@if string.slice($variable, 1, 2) != "--" {
@error "$variable: Must start with --, was \"#{$variable}\"."
}
$name: string.slice($variable, 3);
--#{$name}: initial;
--#{$name}--inverse: ;
@nex3
nex3 / input.scss
Created Feb 19, 2021
Generated by SassMeister.com.
View input.scss
@mixin some-component-a {
$component: ".some-component";
#{$component} {
display: inline;
}
body[lang='fr'] #{$component} div {
display: flex;
}
@nex3
nex3 / input.scss
Created Feb 18, 2021 — forked from umairhm/input.scss
Generated by SassMeister.com.
View input.scss
@mixin some-component-a {
.some-component {
display: inline;
body[lang='fr'] & div {
display: flex;
}
& div {
display: block;
@nex3
nex3 / input.scss
Created Feb 18, 2021
Generated by SassMeister.com.
View input.scss
.component-one {
location: outer;
.html[lang=fr] & {
location: inner;
}
}
@nex3
nex3 / input.scss
Created Feb 11, 2021
Generated by SassMeister.com.
View input.scss
.outer {
prop1: value;
.inner {
x: y;
}
prop2: value;
}
@nex3
nex3 / input.scss
Created Oct 15, 2020
Generated by SassMeister.com.
View input.scss
a {opacity: 50%};
View who-goes-first.md

This is a game we play to see who goes first in a cube game. We select a criterion card at random, then each player chooses a random card from Scryfall. Whoever's card fits the criterion best gets to choose whether to play or draw. The criterion cards we use are as follows:

  • Indiana Jones and the __________
  • "On the Phenomenology of __________" (thesis name)
  • JRPG Move (instant/sorcery only)
  • Metal album cover (by art)
  • Hallmark card (by art)
  • Perfume name
  • Romance novel cover (by art)
  • Shakespearean insult
View fake-sync.js
const wt = require('worker_threads');
if (wt.isMainThread) {
console.log("in main");
const data = new Int32Array(new SharedArrayBuffer(4));
const worker = new wt.Worker(__filename, {
workerData: data
});
Atomics.wait(data, 0, 0);