Skip to content

Instantly share code, notes, and snippets.

View zmeadows's full-sized avatar

Zac Meadows zmeadows

View GitHub Profile
@zmeadows
zmeadows / pack-repo-chatgpt.py
Created October 11, 2025 15:39
A script for compressing a git repo for ChatGPT, including extra metadata to help the LLM.
#!/usr/bin/env python3
"""
pack-repo-chatgpt
-----------------
Package a Git repo for ChatGPT feedback.
Default behavior:
- Packages the current *working tree* (includes unstaged and staged changes)
- Respects .gitignore (tracked + non-ignored untracked files only)
- Produces two outputs in CORE_OUTPUT_DIR:
@zmeadows
zmeadows / log_to_file.cpp
Last active October 15, 2025 12:56
C++ log to file (self-contained)
#define DBG_PRINT_ESCHED true
#ifdef DBG_PRINT_ESCHED
void DBG_PRINT_HELPER(std::stringstream&) {};
template <typename Arg, typename... Args>
void DBG_PRINT_HELPER(std::stringstream& ss, const Arg& arg, const Args&... args) {
ss << arg;
DBG_PRINT_HELPER(ss, args...);
}