Skip to content

Instantly share code, notes, and snippets.

View imaurer's full-sized avatar

Ian Maurer imaurer

View GitHub Profile
<!-- `https://api.substack.com/feed/podcast/160495909/bdd3acc7cd18a69c68ad250654009252.mp3` -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Podcast MP3 Player</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "pyahocorasick",
# ]
# ///
"""
Icon Slicer Script
@imaurer
imaurer / ai_patching_deep_research.md
Created February 3, 2025 14:45
OpenAI Deep Research on Code Patching

LLM-Based Coding Assistants and Patch Application

Large language model (LLM) coding assistants like Sourcegraph Cody, Aider, and Tabby help developers generate and apply code changes. This report examines how these open-source tools prompt LLMs to produce patches, integrate the changes into code, handle common issues, verify results, and what challenges remain.

Prompting Strategies

Structured Prompts for Code Edits – These assistants carefully craft prompts so the LLM knows exactly how to output changes. For example, Aider uses specialized edit formats: it can ask the LLM for a full file rewrite or a diff. Aider often defaults to a diff format, where the LLM is told to return only the changed parts of files using a syntax similar to a unified diff or marked “search/replace” blocks. This reduces token usage and focuses the LLM on the edits. The prompt includes instructions like “produce changes in this format” with file paths and code fences, so the model returns patches instead

@imaurer
imaurer / pb.py
Last active February 9, 2025 22:27
Configurable script for filtering files found in a git repo and copying content to clipboard
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "click",
# "pyperclip",
# "pathspec",
# "rich",
# ]
# ///
@imaurer
imaurer / gpush.sh
Last active January 27, 2025 14:43
Script to sync git repo and push with LLM-drafted git message
#!/bin/bash
#
# gpush: Lazy git add, commit, and push with comments written by LLM
#
#
# This script provides an enhanced git push workflow with the following features:
# - Automatically pulls latest changes from the current branch
# - Checks for uncommitted changes
# - Generates commit messages using AI (LLM/Gemini) if no message is provided
# - Allows interactive editing of auto-generated commit messages
@imaurer
imaurer / 0xglitchbyte_rss.md
Created January 14, 2025 17:27
Glitchbyte's RSS Feeds

A Curated List of Technical Blogs

Introduction

This report provides a curated list of technical blogs catering to software engineers and computer scientists. The blogs cover a wide range of topics, from programming languages and software development to computer architecture and algorithms.

You can see the original tweet here: https://x.com/0xglitchbyte/status/1878854164647968815

This was generated using Gemini Deep Research after having Gemini Flash read the image.

@imaurer
imaurer / 55-bytes-of-css.md
Created October 23, 2024 11:07 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@imaurer
imaurer / testRegex.js
Created August 16, 2024 12:36
Regex for chunking by using all semantic cues
// Updated: Aug. 15, 2024
// Run: node testRegex.js testText.txt
// Used in https://jina.ai/tokenizer
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
const MAX_HEADING_CONTENT_LENGTH = 200;
const MAX_HEADING_UNDERLINE_LENGTH = 200;
@imaurer
imaurer / us_zips.csv
Created January 6, 2024 23:17 — forked from Tucker-Eric/us_zips.csv
US Zip Codes
We can't make this file beautiful and searchable because it's too large.
zip,city,state,state_abbr,county,count_code,latitude,longitude
99553,Akutan,Alaska,AK,Aleutians East,13,54.143,-165.7854
99571,Cold Bay,Alaska,AK,Aleutians East,13,55.1858,-162.7211
99583,False Pass,Alaska,AK,Aleutians East,13,54.841,-163.4368
99612,King Cove,Alaska,AK,Aleutians East,13,55.0628,-162.3056
99661,Sand Point,Alaska,AK,Aleutians East,13,55.3192,-160.4914
99546,Adak,Alaska,AK,Aleutians West,16,51.88,-176.6581
99547,Atka,Alaska,AK,Aleutians West,16,52.1224,-174.4301
99591,Saint George Island,Alaska,AK,Aleutians West,16,56.5944,-169.6186