Skip to content

Instantly share code, notes, and snippets.

View Crisfole's full-sized avatar

Christopher Pfohl Crisfole

  • Apsis Labs
  • Beverly, MA (remote)
View GitHub Profile
@Crisfole
Crisfole / makeZod.ts
Last active July 20, 2023 16:40
JSON Sample Directory to zod types
#!npx ts-node
import { readdir, readFile, writeFile } from "node:fs/promises";
import { basename, join, resolve, relative } from "node:path";
import { cwd } from "node:process";
import { fileURLToPath } from "node:url";
interface JsonFile {
path: string;
content: unknown;
{
"exports": {
".": {
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"//": "Is this what you mean by array syntax?",
"./*": {
"import": ["./dist/*/index.mjs", "./dist/*.mjs"],
"types": ["./dist/*/index.d.ts", "./dist/*.d.ts"]
export async function test() {
console.log("Testing gist previews");
}
@Crisfole
Crisfole / id_rsa.pub
Created October 24, 2019 17:14
my public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo72P875zxcLnWRN73PgQCq45wGeL3I5g+H0NViZByuGHA7VVg3gao3qINZNfQjZP82i/6ePmS450tl/3EZLaAFof0baSfnVP5QeQ2FqpoF2C0IIn3OqOsWxuN8lu97z3WeKv5lSMZdrlljZHK0qcPd0bRNfrNdFRaL9SgqKwmdT2uJdOGhGObpiETb1b3L3Th9YeEiC5qVvCPC/1HaoK5XznNIy1U/No1bst2UEQNlW+X+a8Bniva+Ly+d0ptFKr4k7pgMwPyc9XyXLwgQTpilmE2+WgFzT+QwRtNUFhGPJ0nNPrPxFJxLdfioRDhu7qw+QX2L39VRhjH4s/KWOoj [email protected]
@Crisfole
Crisfole / bus-conversion.md
Last active January 26, 2020 19:16
My best guess for bus conversion steps...Work in Progress

Conversion Steps

Obviously things will come up during any of one these steps requiring reordering of steps, step removal, or step additions. What I'm trying to figure out is if I've got the high level things right...

As I figure it there are three main "areas" of a conversion that can sort of, not really, happen in parallel: Paperwork, Interior, and Exterior. They're obviously highly interconnected since it's one giant beast of a project.

Paper Work/Skills

There are a few things needed to make this sucker street legal: insurance, taxes, fees, registration. We also want to pick up some knowledge/skills. Some of this may simply be reading.

@Crisfole
Crisfole / svelte.d.ts
Last active November 19, 2018 00:04 — forked from mrkishi/svelte.d.ts
Type definitions for Svelte components
// When importing an html file, assume it's a svelte component
declare module '*.html' {
type State = Record<string, any>;
type Changed = Record<string, boolean>;
type ChangeArgs = {
changed: Changed,
current: State,
previous: State
};
interface Cancellable {
INFO global: Vagrant version: 2.0.2
INFO global: Ruby version: 2.4.3
INFO global: RubyGems version: 2.6.14
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: resolv replacement has been enabled!
INFO global: Vagrant version: 2.0.2
INFO global: Ruby version: 2.4.3
INFO global: RubyGems version: 2.6.14
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_NO_PLUGINS="1"

Keybase proof

I hereby claim:

  • I am crisfole on github.
  • I am crisfole (https://keybase.io/crisfole) on keybase.
  • I have a public key whose fingerprint is 6885 3746 B0D3 05BC D136 F0B2 7001 B279 1592 E9A6

To claim this, I am signing this object:

function transform(payload) {
if (payload.data.body.trace) {
payload.data.body.trace.frames.forEach(function(frame) {
frame.orig_filename = frame.filename;
frame.filename = "www.mysite.com/js/" + frame.filename.split("/").pop();
});
}
payload.data.client[is_ios ? "iOS" : "javascript"] = "Cordova";
}