Skip to content

Instantly share code, notes, and snippets.

View jcrooke's full-sized avatar
🎯
Focusing

James Crooke jcrooke

🎯
Focusing
View GitHub Profile
@jcrooke
jcrooke / remove-inline-scripts.js
Created February 26, 2025 17:36
Fix Next.js SSG strict CSP error regarding inline script usage
const { resolve } = require('path');
const { createHash } = require('crypto');
const { readFileSync, writeFileSync } = require('fs');
const { globSync } = require('glob');
/**
* Script to extract inline scripts from HTML files and externalize them
* This helps with CSP (Content Security Policy) compliance by removing inline scripts
*/
@jcrooke
jcrooke / keybase.md
Created October 16, 2024 08:49
Keybase proof

Keybase proof

I hereby claim:

  • I am jcrooke on github.
  • I am jamescrooke (https://keybase.io/jamescrooke) on keybase.
  • I have a public key ASAdHcQZfOCMl78ZTBrUkmtt8oThYAV2OiGm6-_lk8jqSQo

To claim this, I am signing this object: