Skip to content

Instantly share code, notes, and snippets.

@jstockdi
jstockdi / gist:aeaae7f5d01bd3f18d2e40f63633a930
Created January 30, 2026 16:05
Implementing PII Validation Hooks in Claude Code
# Implementing PII Validation Hooks in Claude Code
Hooks are shell commands that run at specific points in Claude Code's workflow. For PII protection, you'll use PreToolUse hooks to inspect and block operations before they execute.
## Step 1: Create the PII Validation Script
Create a file at `.claude/hooks/pii_validator.py`:
```python
#!/usr/bin/env python3
@jstockdi
jstockdi / play-template.md
Created January 10, 2019 15:24
Markdown template for creating plays

(Place the description of the play here. Include a summary of when and why to use the play.)

Use this play to:

  • (List the bullets of what the play accomplishes)
People Time Difficulty
List the roles hereList the roles here as well (Time in hours) hr
/*
Enable dark mode on slack by appending the below code to this file:
/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
NOTE: you will need to change the URL to the latest version of this gist by clicking the "Raw" button.
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://gist.githubusercontent.com/jon077/330e86682905f2c7ffa5e9a755cfe012/raw/fdcf34fcb8f92283d2c0376025b47e28ecc7195c/slack-dark-mode',
@jstockdi
jstockdi / github-codebase-review.sh
Created May 5, 2017 15:54
github-codebase-review
BRANCH_NAME=$1
## Checkout empty orphan
git checkout --orphan ${BRANCH_NAME}-empty
## Remove all files
git rm -r --cached *
@jstockdi
jstockdi / swagger-editor
Created March 7, 2017 20:29 — forked from jstockdill-ebsco/swagger-editor
swagger-editor docker script
#!/bin/sh
#
# Starts the local dockerized swagger editor.
# To start the editor, just run the script: it doesn’t take any arguments.
# You can change the port it uses by editing the SE_PORT variable. You need to make it executable:
#
# chmod 755 swagger-editor
#
# then start it with
#
@jstockdi
jstockdi / Minecraft Recipe
Created July 12, 2014 22:12
Minecraft making recipes
/*****
* In your preInit event, declare your recipes
*
*
* /
@EventHandler
public void preInit(FMLPreInitializationEvent event) {