Skip to content

Instantly share code, notes, and snippets.

View nathanclevenger's full-sized avatar
🚀

Nathan Clevenger nathanclevenger

🚀
View GitHub Profile
@nathanclevenger
nathanclevenger / README.md
Created April 8, 2025 12:35 — forked from sam-lippert/README.md
A fully-functional and extensible metamodeled graph data system with state machines, events, and atomic facts as executable functions. Inspired by ORM and lambda calculus.

exec-symbols

A purely functional DSL for modeling facts, entities, constraints, and state machines in JavaScript—using lambda-calculus–inspired Church encodings and composable building blocks.

This library showcases how to represent boolean logic, pairs, lists, entities, relationships, constraints, events, and more all as functional closures. It may be useful for educational purposes, rule engines, or domain-specific language experiments.


Table of Contents

@nathanclevenger
nathanclevenger / convert.js
Created November 9, 2023 18:22
FreeMind to JSON
var DOMParser = require('xmldom').DOMParser;
var fs = require('fs');
var path = require('path');
function convertBack(xml) {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xml, 'text/xml');
const jsonOutput = {};
const rootNode = xmlDoc.getElementsByTagName('node')[0];

What are the big ideas?

Big Ideas of what you can do with Generative AI

@nathanclevenger
nathanclevenger / worker.js
Last active March 30, 2023 17:19
matthew
import { json } from 'https://pkg.do/itty-router-extras'
export default {
fetch: req => json({ hello: 'Matthew', from: req.cf.city })
}
@nathanclevenger
nathanclevenger / github-proxy-client.js
Created February 19, 2023 19:41 — forked from DavidWells/github-proxy-client.js
Full Github REST api in 34 lines of code
/* Ultra lightweight Github REST Client */
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const token = 'github-token-here'
const githubClient = generateAPI('https://api.github.com', {
headers: {
'User-Agent': 'xyz',
'Authorization': `bearer ${token}`
}
})
@nathanclevenger
nathanclevenger / worker.js
Last active December 12, 2022 14:39
CF Header
import { json } from 'https://pkg.do/itty-router-extras'
export default {
fetch: req => json(req)
}
@nathanclevenger
nathanclevenger / worker.js
Last active December 2, 2022 11:18
CURL to JSON
import curlToHar from 'https://pkg.do/curl-to-har'
import { json } from 'https://pkg.do/itty-router-extras'
export default {
fetch: req => {
const { origin, pathname, search } new URL(req.url)
const curl = curlToHar(pathname + search)
return json({curl})
}
}
@nathanclevenger
nathanclevenger / worker.js
Last active November 29, 2022 20:30
Workers for Platforms as DB
export default {
fetch: req => json(northwind)
}
const json = obj => new Response(JSON.stringify(obj, null, 2), { headers: { 'content-type': 'application/json; charset=utf-8' }})
const northwind = {
"Category": [
{
"picture": null,
@nathanclevenger
nathanclevenger / worker.js
Created November 26, 2022 13:13
Zapier Apps
export default {
fetch: req => fetch('https://zapier.com/api/v4/implementations-meta/public/', { headers: { accept: 'application/json' }})
}