Skip to content

Instantly share code, notes, and snippets.

View gbourant's full-sized avatar

gbourant gbourant

View GitHub Profile
@gbourant
gbourant / hx-clone.js
Created January 4, 2025 04:11 — forked from pauloevpr/hx-clone.js
Simple HTMX extension to allow cloning <template> elements in the DOM to avoid a round trip to the server.
htmx.config.useTemplateFragments = true
htmx.defineExtension('clone', {
onEvent: function (name, evt) {
if (name === 'htmx:beforeRequest') {
if (evt.detail.elt) {
const get = evt.detail.elt.getAttribute('hx-get')
if (get && get.startsWith('clone:')) {
const selector = get.substring(6)
//console.log('htmx-clone: Intercepting xhr request to inject template with selector:', selector)
const template = document.querySelector(selector)
@gbourant
gbourant / pre-commit-nocheckin
Created February 24, 2025 21:13 — forked from xezrunner/pre-commit-nocheckin
nocheckin pre-commit hook for Git
#!/bin/bash
# Author: xezrunner (github.com/xezrunner)
# Inspired by Jonathan Blow's nocheckin setup with SVN (twitch.tv/j_blow) (youtube.com/@jblow888)
# Credit: DustinGadal on r/Jai: reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1
# Required programs/utilities: git, grep, xargs, wc
# To install, move and rename to <repo>/.git/hooks/pre-commit (or merge)
# The file name has to be "pre-commit" for Git to use it. Compatible with Github Desktop GUI.
@gbourant
gbourant / pre-commit-nocheckin
Created February 24, 2025 21:13 — forked from xezrunner/pre-commit-nocheckin
nocheckin pre-commit hook for Git
#!/bin/bash
# Author: xezrunner (github.com/xezrunner)
# Inspired by Jonathan Blow's nocheckin setup with SVN (twitch.tv/j_blow) (youtube.com/@jblow888)
# Credit: DustinGadal on r/Jai: reddit.com/r/Jai/comments/jp0vjy/nocheckin_behavior_in_gitsourcetree/gbfhzd1
# Required programs/utilities: git, grep, xargs, wc
# To install, move and rename to <repo>/.git/hooks/pre-commit (or merge)
# The file name has to be "pre-commit" for Git to use it. Compatible with Github Desktop GUI.
@gbourant
gbourant / ISO3166-1.alpha2.json
Created June 26, 2025 14:23 — forked from ssskip/ISO3166-1.alpha2.json
json of country codes (ISO 3166-1 alpha-2) and corresponding names
{
"AF": "Afghanistan",
"AX": "Aland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",

Bug Reproduction Documentation - Overview & Format

Mission & Context

You are conducting production-grade bug reproduction and analysis for the Aspire project. This is not a casual bug verification exercise - your output will be used by:

  1. Engineering teams to understand and fix bugs
  2. Technical writers to create bug reports and documentation
  3. QA teams to verify fixes
  4. Community contributors who need clear reproduction steps
@gbourant
gbourant / SKILL.md
Created July 14, 2026 19:51 — forked from tandpfun/SKILL.md
Extract Clothing Skill
name extract-clothing-cutouts
description Extract high-quality, deduplicated transparent ecommerce clothing cutouts from a folder of photographs where people wear one or more garments. Use when Codex must find outfit or model photos, identify unique clothing across images, create focused references, reconstruct complete garments with Imagegen, remove a solid chroma background into RGBA PNGs, and output only the finished clothing images into a new folder under the current working directory.

Extract Clothing Cutouts

Turn photographs of worn clothing into source-faithful standalone catalog PNGs. Treat each result as a reconstruction from visible evidence, not literal segmentation whenever the wearer or another layer occludes part of the garment.

Start by asking for two paths

import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host