Skip to content

Instantly share code, notes, and snippets.

View tylergannon's full-sized avatar

Tyler Gannon tylergannon

  • Ciudad de Colon, Costa Rica
  • 22:00 (UTC -06:00)
View GitHub Profile
@tylergannon
tylergannon / consumer-faq-no-fault.md
Created June 13, 2026 23:57
PDX production KB proof corpus 20260613T235701Z

Auto Insurance in New York: Frequently Asked Questions

As of: June 2026. Plain-language guide for consumers; your policy and the law control if anything here differs.

Q. What insurance am I required to carry on my car in New York?

Every registered vehicle must carry three coverages, all from a company authorized in New York:

  1. Liability coverage of at least $25,000 per person / $50,000 per accident for bodily injury, $50,000 / $100,000 for death, and $10,000 for property damage.
  2. No-fault (Personal Injury Protection) of at least $50,000 per person.
@tylergannon
tylergannon / graph.svg
Created February 24, 2026 21:22
cat-monitor-user-story-generator-with-models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tylergannon
tylergannon / user-story-generator.svg
Created February 24, 2026 21:16
cat-monitor-user-story-generator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tylergannon
tylergannon / $lib-server-mongoose-index.ts
Last active June 25, 2024 03:14
Avoiding OverwriteModelError while developing with mongoose and Svelte Kit (vite) dev server
/**
* @fileoverview Exports all models and mongoose instance
* @author @tylergannon
*
* Note the conditional creation of new models. This is to prevent
* conflict during development, between the HMR process repeating the
* same calls to mongoose.model(), which is not idempotent but throws
* an error if the model already exists.
*/
import type { Model } from 'mongoose';
@tylergannon
tylergannon / Instructions.md
Created February 16, 2023 14:49
Building Python C extensions on macOS

Setting up and building a Python C extension project on macOS

These instructions were developed for a project using vscode on macOS 13.0.1.

Install needed software

If you haven't already, you'll need an updated xcode command-line tools. Do this by running xcode-select --install or by going to https://developer.apple.com and downloading the XCode command line tools. I wound up with version 14.2.

cmake

@tylergannon
tylergannon / JvmTest.kt
Last active May 8, 2022 23:34
Kotlin multiplatform with compose tests
class ModelContainerHostTest {
@get:Rule
val composeTestRule = createComposeRule()
@Test fun firstTest() = runBlocking {
composeTestRule.setContent {
@Composable fun doAThing() = 1
doAThing() shouldBeExactly 2
}
@tylergannon
tylergannon / vim.md
Last active August 1, 2019 09:51
vim cheat sheet
@tylergannon
tylergannon / RBTree.rs
Last active November 25, 2025 17:55
Red Black Tree written in Rust
#![allow(dead_code)]
extern crate rand;
use std::cmp::Ord;
use std::cmp::Ordering;
use std::fmt::Debug;
use std::iter::Iterator;
use std::iter::IntoIterator;
use rand::Rng;
@tylergannon
tylergannon / GreaterThanBST.kt
Last active March 22, 2019 05:51
Kotlin Red Black Tree. For a programming challenge. Instead of a key-value store, it returns the number of items added, whose value is greater than than the given key.
class GreaterThanBST {
private var root : Node? = null
fun add(key : Int) {
root = put(root, key)
}
operator fun get(key : Int) : Int = get(root, key)
@tylergannon
tylergannon / Install-BaseComponents.ps1
Last active June 23, 2018 00:28
Install base components for Kubo
& {
$wid=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$prp=new-object System.Security.Principal.WindowsPrincipal($wid)
$adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator
$IsAdmin=$prp.IsInRole($adm)
if (-not $IsAdmin)
{
Write-Host -ForegroundColor Yellow "This needs to be run as administrator."
Write-Host -ForegroundColor Yellow "Please open a new powershell as administrator, and try again."
exit 2