Skip to content

Instantly share code, notes, and snippets.

View jonshaffer's full-sized avatar
🤯

Jonathan Shaffer jonshaffer

🤯
View GitHub Profile
@jonshaffer
jonshaffer / 00-GoldenKubeDecks.md
Last active April 21, 2026 14:14
golden kubestronaut practice decks

placeholder

Research: UniFi API CRUD Operations & Terraform Lifecycle Mapping

Verified against live UniFi controller on 2026-03-28. Controller firmware: UniFi Network Application (Dream Machine Pro).

Summary of Findings

The original spec and data-model.md assumptions were partially wrong. Key corrections:

  1. DNS v2 API supports PUT — the bash scripts use delete+recreate but that's a choice, not a constraint
@jonshaffer
jonshaffer / .swiftbarignore
Last active December 6, 2025 12:34
nix darwin manager swiftbar plugin
# Ignore log directories and files
*/.logs/
*/logs/
*.log
# Ignore temporary and cache files
*.tmp
*.swp
.DS_Store
*/.DS_Store

Pull Request Review Time Analysis

Dataset: 76,227 merged PRs from 25 open-source repositories Analysis Date: December 2025 Target Variable: review_time_hours (time from PR creation to merge)


Executive Summary

⏺ Hygiene Signal Types Summary

Based on the signal research in your spec directory, here are the 9 major categories with the best-fit examples for a Backstage plugin:

🔒 Security & Dependencies

  • Dependabot Alerts - CVEs in npm/pip dependencies
  • Container Image Vulnerabilities - Trivy/Grype scan results
  • EPSS Scores - Exploit prediction (likelihood of exploitation within 30 days)
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Munhall 2025 Waste & Recycling (generated by ChatGPT)//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VEVENT
UID:munhall-holiday-newyear'sday-2025@chatgpt
DTSTART;VALUE=DATE:20250101
DTEND;VALUE=DATE:20250102
SUMMARY:New Year's Day (Collection Delayed)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Learning Practice Deck Schema (v4 - Deck Object)",
"description": "A schema for representing a deck of learning practice content (flashcards, quizzes) including metadata about the deck itself and a hierarchical topic structure.",
"type": "object",
"properties": {
"deckId": {
"type": "string",
"description": "Unique identifier for the learning deck (e.g., UUID).",
"format": "uuid"
@jonshaffer
jonshaffer / dsa.md
Last active September 5, 2025 12:14

Legend: ★ = must-know, ◇ = nice-to-have.

Core Data Structures

  • ★ Arrays & Dynamic Arrays (indexing, resizing, cache locality)
  • ★ Linked Lists (singly/doubly, cycle detection)
  • ★ Stacks & Queues (array vs. linked, deque)
  • ★ Hash Tables (hashing, collisions, load factor, open addressing vs chaining)
  • ★ Trees (binary tree traversals; BST invariants)
  • ★ Heaps/Priority Queues (binary heap ops; k-way merge; top-k)
@jonshaffer
jonshaffer / ml.md
Last active September 5, 2025 12:05

Legend: ★ = must-know, ◇ = nice-to-have.

Classification

  • ★ Logistic Regression — linear decision boundary; well-calibrated probs, fast baseline.
  • ◇ k-Nearest Neighbors — vote of nearby points; non-parametric, can be slow at scale.
  • ★ Naive Bayes (Gaussian/Multinomial) — assumes feature independence; great for text.
  • ★ Support Vector Machines (SVM) — max-margin hyperplane; kernels handle nonlinearity.
  • ★ Decision Tree — if-then rules; interpretable, prone to overfit without pruning.
  • ★ Random Forest — bagged trees; strong default, robust to noise, handles mixed types.

Real-Time Updates in SwiftUI

Prompt to Make The Prompt

Used Gemini 2.5 Pro

This came from a convo where I said:

How do people do live updates in swift apps