Skip to content

Instantly share code, notes, and snippets.

View lancejpollard's full-sized avatar
😍
Lots of coding

Lance Pollard lancejpollard

😍
Lots of coding
View GitHub Profile
@lancejpollard
lancejpollard / leaf.ts
Created February 5, 2024 22:50
AWS Lambda file uploader
import _ from 'lodash'
import { ReadStream } from 'fs'
import busboy, { FileInfo } from 'busboy'
import DEBUG from 'debug'
import kink from './kink.js'
import { Event } from './router.js'
const debug = DEBUG('load-file')
export type HandleFileInput = {
@lancejpollard
lancejpollard / leaf.ts
Created February 5, 2024 19:54
BusBoy with Express, like Multer but not middleware and a little cleaner
import { Request, Response } from 'express'
import _ from 'lodash'
import { ReadStream } from 'fs'
import onFinished from 'on-finished'
import busboy, { FileInfo } from 'busboy'
import DEBUG from 'debug'
import kink from './kink.js'
const debug = DEBUG('load-file')
@lancejpollard
lancejpollard / parse.js
Last active February 21, 2024 11:42
FFmpeg data collections in JSON (filters, encoders, decoders, codecs, and formats)
const fs = require('fs')
const codecs = ` D.VI.S 012v Uncompressed 4:2:2 10-bit
D.V.L. 4xm 4X Movie
D.VI.S 8bps QuickTime 8BPS video
.EVIL. a64_multi Multicolor charset for Commodore 64 (encoders: a64multi)
.EVIL. a64_multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5)
D.V..S aasc Autodesk RLE
D.V.L. agm Amuse Graphics Movie
D.VIL. aic Apple Intermediate Codec
@lancejpollard
lancejpollard / licences.json
Created December 17, 2023 20:37
licenses.json
{
"licenseListVersion": "ef5a479",
"licenses": [
{
"reference": "https://spdx.org/licenses/0BSD.html",
"isDeprecatedLicenseId": false,
"detailsUrl": "https://spdx.org/licenses/0BSD.json",
"referenceNumber": 532,
"name": "BSD Zero Clause License",
"licenseId": "0BSD",
@lancejpollard
lancejpollard / itt-coc.ts
Created December 6, 2023 05:09 — forked from VictorTaelin/itt-coc.ts
ITT-Flavored Calculus of Constructions Type Checker
// A nano dependent type-checker featuring inductive types via self encodings.
// All computation rules are justified by interaction combinator semantics,
// resulting in major simplifications and improvements over old Kind-Core.
// A more complete file, including superpositions (for optimal unification)
// is available on the Interaction-Type-Theory repository.
// Credits also to Franchu and T6 for insights.
// This is a new development, may have bugs (:
// Lists
type List<A> =
@lancejpollard
lancejpollard / list.md
Last active February 21, 2024 11:42
Phrase structure rule abbreviations (partial)
S - Sentence
NP - Noun Phrase
VP - Verb Phrase
PP - Prepositional Phrase
AdvP - Adverb Phrase
AdjP - Adjective Phrase
Det - Determiner
N - Noun
V - Verb
@lancejpollard
lancejpollard / readme.md
Last active February 21, 2024 11:43
List Hunspell Dictionaries
@lancejpollard
lancejpollard / soundex.js
Created November 2, 2023 06:05 — forked from shawndumas/soundex.js
Soundex in JavaScript
var soundex = function (s) {
var a = s.toLowerCase().split(''),
f = a.shift(),
r = '',
codes = {
a: '', e: '', i: '', o: '', u: '',
b: 1, f: 1, p: 1, v: 1,
c: 2, g: 2, j: 2, k: 2, q: 2, s: 2, x: 2, z: 2,
d: 3, t: 3,
l: 4,
@lancejpollard
lancejpollard / a.readme.md
Last active February 21, 2024 11:43
Wiktionary Table Parser

Wiktionary HTML Table Parser

This should work against these Wiktionary declension and conjugation tables. On each Wiktionary link/page, scroll down to the conjugation or declention table and click to expand it, to test this on it.

success language form operation title
Danish noun declension Danish Noun Declension
French verb conjugation French Verb Conjugation
@lancejpollard
lancejpollard / arabic.root.candidate.csv
Last active December 12, 2023 07:20
11137 Arabic Root Candidates from Hans Wehr word list
word
ابا
اباء
اباق
ابان
اباه
ابت
ابتر
ابتز
ابتع