Skip to content

Instantly share code, notes, and snippets.

View pckilgore's full-sized avatar

Patrick Kilgore pckilgore

View GitHub Profile
@pckilgore
pckilgore / ynab.mjs
Last active August 26, 2025 13:15
Simple YNAB Node JS Export Every Budget Script
#!/usr/bin/env node
import { writeFile } from "node:fs/promises"
const token = "<YOUR API TOKEN>"
const f = (route = "") =>
fetch(`https://api.youneedabudget.com/v1/budgets/${route}`, {
headers: {
"authorization": `Bearer ${token} `
@pckilgore
pckilgore / decryptor.ts
Last active August 10, 2025 02:57
Godspeed.app Encrypted Field Decryptor
/*
If you use godspeedapp.com (it's great, tell Daniel I sent you, but if you found this
you probably already use it) and want to use the API without disabling your E2E encryption
this code provides a template for you to do so. Have a generative model turn it into
your language of choice.
**NOTE** #init() expects a trimmed key.
**NOTE** Don't ship your fucking private key. Load it from a secret store you
trust according to your threat model.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@pckilgore
pckilgore / machine.js
Created July 13, 2021 22:43
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@pckilgore
pckilgore / remove_workflow_runs.sh
Last active May 10, 2023 07:24
Batch Delete Github Workflow Runs Shell Script
#!/bin/bash
ORG_NAME=$1
REPO_NAME=$2
WORKFLOW_NAME=$3
if [[ -z $WORKFLOW_NAME || -z REPO_NAME || -z ORG_NAME ]]; then
echo "Usage: bash remove_workflow_runs.sh <USER/ORG NAME> <REPO NAME> <WORKFLOW NAME>"
exit 1
fi
@pckilgore
pckilgore / example.jsx
Last active April 21, 2021 20:19
GlobalVariableContext.useSetValue();
import React from "react";
import { Button } from "react-native";
import * as GlobalVariableContext from "./config/GlobalVariableContext";
export const MyVariableSetter = () => {
const setGlobalVariable = GlobalVariableContext.useSetValue();
const myNewValue = { key: "mySettableGlobal", value: "new value" };
return (
@pckilgore
pckilgore / example.jsx
Last active May 13, 2021 20:07
GlobalVariableContext.useValues()
import React from "react";
import { Text } from "react-native";
import * as GlobalVariableContext from "./config/GlobalVariableContext";
export const MyVariableDisplay = () => {
const variables = GlobalVariableContext.useValues();
return <Text> { variables.myGlobal } </Text>
};
@pckilgore
pckilgore / HelloWorld.ts
Created April 21, 2021 18:36
HelloWorld.ts
type message = { hello: "world" };
function greeter(t: message) {
return Object.entries(t).flat().join(" ");
}