Skip to content

Instantly share code, notes, and snippets.

View vhppp's full-sized avatar

Vincent Perricone vhppp

  • Paperless Post
  • NYC
  • 00:41 (UTC -04:00)
View GitHub Profile
@vhppp
vhppp / claude-hist.sh
Created July 22, 2026 17:05
claude-hist
#!/usr/bin/env bash
set -euo pipefail
# claude-hist: fuzzy-find a past Claude Code session across every project and
# resume it. Search matches titles/branches first, then conversation text.
# Sessions list newest first with each parent's subagents grouped beneath it;
# selecting a subagent resumes its parent. Selecting a session cd's to its
# working directory and runs `claude --resume`. A bottom preview pane shows the
# transcript (PgUp/PgDn scroll it, arrow keys move the selection) with query
# terms highlighted.
@vhppp
vhppp / tf_vars_sort.awk
Created August 6, 2024 14:44 — forked from yermulnik/tf_vars_sort.awk
Sort Terraform (HCL) file by Resource Block Names using GNU `awk`
#!/usr/bin/env -S awk -f
# https://gist.github.com/yermulnik/7e0cf991962680d406692e1db1b551e6
# Tested with GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
# Usage: /path/to/tf_vars_sort.awk < variables.tf | tee sorted_variables.tf
# Note: "chmod +x /path/to/tf_vars_sort.awk" before use
# No licensing; yermulnik@gmail.com, 2021-2024
{
# skip blank lines at the beginning of file
if (!resource_type && length($0) == 0) next