Skip to content

Instantly share code, notes, and snippets.


Thomas Neil James Shadwell Zemnmez

View GitHub Profile
View gist:dbc7dfeddb9bfe09955f70e0e31f5b2c
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 / 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 / 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 }
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 = {
} as const;
const zero = Symbol(0);
View math.test.ts
import * as matrix from './matrix';
import * as vec from './vec';
[<3, 2>([
] as const),
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 ${ => `"${v}"`).join(" or ")}`: ""))
export const AdaptCultistJson:
(i: string) => string
([char, ...chars]) => {
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

Choose a car: Volvo Saab Mercedes Audi