Skip to content

Instantly share code, notes, and snippets.

{
location: {
city: "Austin",
state: "TX"
},
category: {
name: "Professional Services",
id: 42,
"description": "Welcome to Austin, Texas's best directory brought to you by the OwnLocal. Check out businesses like Dime Box Cattle Co...",
"images": [
@pib
pib / float_bug.go
Last active March 3, 2016 00:11
Demonstration of float scan bug in github.com/go-sql-driver/mysql
package main
import (
"database/sql"
"fmt"
"log"
_ "github.com/go-sql-driver/mysql"
)
{
"query": {
"bool": {
"should": [
{
"simple_query_string": {
"fields": [
"name^3",
"description",
"service_location",
@pib
pib / bell-on-input-needed.sh
Created February 26, 2026 21:30
Claude Code hook: ring terminal bell when user input is needed (permission dialogs, questions)
#!/bin/bash
# Ring terminal bell when Claude needs user input.
# Registered on: Notification (permission_prompt), Stop
#
# - Notification:permission_prompt fires for tool permissions AND AskUserQuestion
# dialogs, after a ~6s typing-idle delay. Bell rings unconditionally.
# - Stop fires when Claude's turn ends. Bell rings only if the final message
# ends with "?" (trailing whitespace stripped).
#
# Always exits 0 — never break Claude's workflow over a cosmetic bell.