Skip to content

Instantly share code, notes, and snippets.

View jfrobbins's full-sized avatar

Jon Robbins jfrobbins

  • NC
  • 23:36 (UTC -05:00)
View GitHub Profile
@jfrobbins
jfrobbins / pyCollapse.py
Created October 9, 2025 13:04
A tool to recursively scan a directory and collapse its contents into a single file. It provides intelligent API and structure parsing for Python files and works generically with any other readable text file, such as C# (.cs), Java, JSON, Markdown, etc. Ideal for creating a comprehensive project overview for AI analysis.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# --- MIT License ---
#
# Copyright (c) 2025 [Jon Robbins]
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@jfrobbins
jfrobbins / pdf_to_png.py
Last active May 5, 2025 20:38
Python script that allows you to export pages from a PDF file to PNG images. The script can be run from the command line, supports exporting specific pages or a range of pages, and includes an option to export all pages. The output images are saved in a directory named after the PDF file (without the extension) within the same directory as the P…
# Filename: pdf_to_png.py
# Summary: Converts specified or all PDF pages to PNG images on macOS, extracting the first non-empty text line as the title for filenames.
# Filenames are structured as <file-name>_pg-<page-number>_<slide-title>.png for better sorting by page number.
# Page numbers are padded with leading zeros based on the total number of pages.
# Usage:
# - Convert all pages: python pdf_to_png.py input.pdf
# - Convert a range (e.g., pages 3-7): python pdf_to_png.py input.pdf --pages 3-7
# - Convert specific pages (e.g., pages 1,3,5): python pdf_to_png.py input.pdf --pages 1,3,5
# Dependencies:
# - pdf2image: Install via `pip install pdf2image`
@jfrobbins
jfrobbins / gpg-setup-and-use-guide.md
Last active October 12, 2025 03:41
GPG Guide for setup and use

GPG Setup, Key Management, and File Encryption Guide (Using Modern ECC Encryption)

This guide covers installing GPG on various operating systems (Windows, macOS, and Linux), generating a new key pair using modern Elliptic Curve Cryptography (ECC), exporting your public key, encrypting and decrypting files using users’ public keys, and encryption best practices.

Note: Newer versions of GnuPG (2.2 and later) support ECC keys. It is recommended to use ECC (such as Curve25519 for encryption and EdDSA/Ed25519 for signing) instead of RSA for improved security and performance.


1. Installing GPG

@jfrobbins
jfrobbins / ai-agent-comparisons-20250304.md
Created March 4, 2025 13:37
AI Agents Under $25/Month: Comparison and Recommendations

AI Agents Under $25/Month: Comparison and Recommendations

Code Generation & Documentation

Code Generation

All these AI assistants can generate code, but they differ in approach and integration.

  • ChatGPT Plus (GPT-4):
    • Excels in generating well-documented code with detailed explanations.
  • No default IDE integration, but plugins exist.
@jfrobbins
jfrobbins / evm_deembed.py
Last active March 4, 2025 19:54
Notes on de-embedding EVM values
###################################
# these are the variables to use for the de-embedding.
# the system EVM floor that you want to deEmbed is EVM_systemFloor(dB)
# EVM_minSystemFloor(dB) is the floor to add back in, to keep things reasonable
#
# Update the EVM system floor values below in the dictionary.
#
# This script assumes that your data is already loaded into a Pandas Dataframe `df`
###################################
global evm_db_to_percent, evm_deembed_pct, evm_embed_pct, evm_percent_to_db
@jfrobbins
jfrobbins / evm.py
Created February 26, 2025 17:11
Common EVM Calculations
import numpy as np
def evm_percent_to_db(evm_percent):
"""
Convert EVM from percentage to dB.
Parameters:
evm_percent (float): EVM in percent.
@jfrobbins
jfrobbins / transcode_m4a_to_ogv_vorbis.py
Last active January 2, 2025 20:06
A script to batch transcode .m4a files to .ogv with Vorbis audio using FFmpeg, allowing for both CBR and VBR settings for file size optimization.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
transcode_m4a_to_ogv_vorbis.py
A script to batch transcode .m4a files to .ogv with Vorbis audio using FFmpeg,
allowing for both CBR and VBR settings for file size optimization.
Based on:
- https://gist.github.com/jfrobbins/0f8ef94b1a7ff780f74a320a2fd9530c
@jfrobbins
jfrobbins / blue-snowball-microphone-settings.md
Last active January 2, 2025 19:54
Blue Snowball Microphone Settings

Referencing both manuals for the Snowball Blue Microphone (and this manual) which provide similar information with different descriptions of the settings, this switch controls the pickup pattern,

Position 1,

  • Setting: Cardioid (capsule)
  • Applications: speech, vocals, podcasting
  • Picks up sound from the front, ideal for podcasting, game streaming or recording vocals and instruments
@jfrobbins
jfrobbins / base62_encoder_decoder.py
Created December 26, 2024 03:16
A Python script that converts 7-character alphanumeric codes (LXXXYYY, where L is A-D and XXX, YYY are numbers 001-999) into 4-character base-62 encoded strings, and vice versa. It uses base-62 (0-9, A-Z, a-z) for compact, reversible encoding.
"""
The goal with this script is to predictably encode and decode 7 digits <> 4 digits using base-62.
e.g.
D052077 <-> 6JJX
some example codes:
D159098
D054080
B052077
"""
@jfrobbins
jfrobbins / classic-deviled-eggs-recipe.md
Created December 23, 2024 12:25
Classic Deviled Eggs Recipe

Classic Deviled Eggs

I started with this recipe from Southern Living. With our chickens laying a plethora of eggs, I've been making deviled eggs a lot lately for functions, tweaking the recipe to my liking.

Ingredients:

  • 12 large eggs
  • 4 to 6 tablespoons mayonnaise
  • 4 teaspoons spicy brown mustard