Skip to content

Instantly share code, notes, and snippets.

@sgasser
sgasser / README.md
Last active February 11, 2026 14:07
Claude Code security hook - blocks dangerous commands, credential files, and bypass attempts

Claude Code Security Setup

Two-layer protection for sensitive files and destructive commands.

Setup

  1. Copy settings.json content to ~/.claude/settings.json
  2. Save security-validator.py to ~/.claude/hooks/security-validator.py
  3. Make executable: chmod +x ~/.claude/hooks/security-validator.py
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
/*
A Revised Font Stack
from A Way Back
http://www.awayback.com/revised-font-stack/
*/
/*