Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
oof

Thomas Neil James Shadwell Zemnmez

💭
oof
View GitHub Profile
View gist:dbc7dfeddb9bfe09955f70e0e31f5b2c
inline:
autolink: /^<([a-zA-Z][a-zA-Z0-9+.-]{1,31}:[^\s\x00-\x1f<>]*|[a-zA-Z0-9.!#$%&'*+/=?_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_]))>/
blockSkip: /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g
br: /^( {2,}|\\)\n(?!\s*$)/
breaks: {escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~~|])/, autolink: /^<([a-zA-Z][a-zA-Z0-9+.-]{1,31}:[^\s\x00-\x1f<>]*…9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_]))>/, url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)…0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/i, tag: /^<!--(?!-?>)[\s\S]*?-->|^</[a-zA-Z][\w:-]*\s*>|^<…<![a-zA-Z]+\s[\s\S]*?>|^<!\[CDATA\[[\s\S]*?\]\]>/, link: /^!?\[((?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\…'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)))?\s*\)/, …}
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/
del: {exec: ƒ}
em: {start: /^(?:(\*(?=[!"#$%&'()+\-.,/:;<=>?@\[\]`{|}~]))|\*)(?![*\s])|_/, middle: /^\*(?:(?:(?!__[^_]*?__|\*\*\[^\*\]*?\*\*)(?:[^*]|…:[^_]|\\_)|__[^_]*?__|\*\*\[^\*
@Zemnmez
Zemnmez / i18n.txt
Created Nov 9, 2020
words in i18n style
View i18n.txt
This file has been truncated, but you can view the full file.
e21s: electroencephalograph's
A20s: Andrianampoinimerina's
c20s: counterrevolutionary's
c20s: counterrevolutionaries
e20s: electroencephalographs
e20s: electroencephalogram's
c19s: counterintelligence's
e19h: electroencephalograph
e19s: electroencephalograms
@Zemnmez
Zemnmez / ascii.ts
Created Oct 19, 2020
i honestly have not a fuckin clue why I wrote this
View ascii.ts
interface _Ascii {}
export type Ascii = _Ascii[keyof _Ascii];
interface _CtrlChar { }
export type Control = _CtrlChar[keyof _CtrlChar]
export const NUL = "\x00" as const;
export type NUL = typeof NUL;
interface _CtrlChar { [NUL]: NUL }
View what.rs
struct TokenizationStep(fn(
runes: dyn Iterator<Item=io::Result<String>>,
stack: dyn Iterator<Item=TokenizationStep>) -> io::Result<Box<dyn Iterator<Item=Box<dyn Token>>>>);
fn parseFile(runes: impl Iterator<Item=io::Result<String>>, stack: Box<dyn Iterator<Item=TokenizationStep>>) -> io::Result<Box<impl Iterator<Item=Box<impl Token>>>> {
return parseText(runes, stack)
}
struct Text(String);
View fights.tsx
import React from 'react';
import * as d3Scale from 'd3-scale';
import * as d3Array from 'd3-array';
const d3 = {
...d3Scale,
...d3Array
} as const;
const zero = Symbol(0);
View math.test.ts
import * as matrix from './matrix';
import * as vec from './vec';
test.each([
[
matrix.as<3, 2>([
[1,2,3],
[4,5,6]
] as const),
@Zemnmez
Zemnmez / cultistparser.ts
Created Jun 21, 2020
wip parser for cultist simulator's 'json' format
View cultistparser.ts
type runes = string[];
const unexpected = (char: string, ...expected: string[]) =>
new Error(`unexpected "${char}"` + (expected.length?`; expected ${expected.map(v => `"${v}"`).join(" or ")}`: ""))
export const AdaptCultistJson:
(i: string) => string
=
([char, ...chars]) => {
@Zemnmez
Zemnmez / ritecalculator.ts
Created Jun 18, 2020
calculates what rites are available in the game cultist simulator
View ritecalculator.ts
/* Rite Calculator */
/* Scroll down to add followers to the follower list!! */
type Principle = Aspect.Forge | Aspect.Heart | Aspect.Winter | Aspect.Edge
| Aspect.Lantern | Aspect.Moth | Aspect.Grail | Aspect.Knock | Aspect.SecretHistories;
enum Kind {
Card, Slot, Recipe
}
View abc.md

Choose a car: Volvo Saab Mercedes Audi

You can’t perform that action at this time.