Skip to content

Instantly share code, notes, and snippets.

View nex3's full-sized avatar

Natalie Weizenbaum nex3

  • Google
  • Seattle
View GitHub Profile
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 April 9, 2021 20:41
Generated by SassMeister.com.
@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 February 19, 2021 00:03
Generated by SassMeister.com.
@mixin some-component-a {
$component: ".some-component";
#{$component} {
display: inline;
}
body[lang='fr'] #{$component} div {
display: flex;
}
@nex3
nex3 / input.scss
Created February 18, 2021 23:58 — forked from umairhm/input.scss
Generated by SassMeister.com.
@mixin some-component-a {
.some-component {
display: inline;
body[lang='fr'] & div {
display: flex;
}
& div {
display: block;
@nex3
nex3 / input.scss
Created February 18, 2021 08:15
Generated by SassMeister.com.
.component-one {
location: outer;
.html[lang=fr] & {
location: inner;
}
}
@nex3
nex3 / input.scss
Created February 11, 2021 23:36
Generated by SassMeister.com.
.outer {
prop1: value;
.inner {
x: y;
}
prop2: value;
}
@nex3
nex3 / input.scss
Created October 15, 2020 23:22
Generated by SassMeister.com.
a {opacity: 50%};

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
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);
picker: {type: FirstToScore, threshold: 80}
otherwise: {type: Meander}
choices:
- consider: [{type: Bladder, weight: 3}]
then:
type: Thinker
picker: {type: FirstToScore, threshold: 80}
choices:
- consider: [{type: Bladder, weight: 3}]
then: {type: Pee}