Skip to content

Instantly share code, notes, and snippets.

View nathanclevenger's full-sized avatar
🚀

Nathan Clevenger nathanclevenger

🚀
View GitHub Profile
@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' }})
}
css

LINEAR - LIMITED BETA RELEASE

The issue tracking tool you'll enjoy using

Linear helps streamline software projects, sprints, tasks, and bug tracking. It's built for high-performance teams.

enter your work email Request Early Access