Skip to content

Instantly share code, notes, and snippets.

View zackiles's full-sized avatar

Zachary Iles zackiles

View GitHub Profile
@zackiles
zackiles / gnu-unified-diff-prompt.json
Created November 3, 2024 02:43
Token-Efficient and Consistent AI Code Generation Through GNU Unified Diff (JSON)
{
"OUTPUT_FORMAT": {
"type": "JSON",
"encoding": "UTF-8",
"structure": {
"target_file": "string (relative path with forward slashes)",
"diff": "string (unified diff with \\n line breaks)",
"error": "string (optional, only present for errors)"
}
},
@zackiles
zackiles / bind_hack.js
Created November 26, 2015 00:10 — forked from tralamazza/bind_hack.js
node.js bind() hack
/*
* Author: Daniel Tralamazza <tralamazza@gmail.com>
*
* Patch Socket for a before connect event.
* Important! You must require this module before anything else.
*
* Usage:
*
* var patch = require('./bind_hack');
* var bind_f = process.binding('net').bind;