Skip to content

Instantly share code, notes, and snippets.

View zcaceres's full-sized avatar
👨‍💻
programming

Zach Caceres zcaceres

👨‍💻
programming
View GitHub Profile
@boxabirds
boxabirds / sqlite-d1-cloudflare-safety-guard.ts
Created January 24, 2026 19:36
Prevent your wild and crazy coding agent do really dangerous things to your Cloudflare D1 data
#!/usr/bin/env bun
/**
* Claude Code PreToolUse hook: D1/SQLite Safety Guard
*
* Blocks operations that WILL cause problems with D1/SQLite schema management.
*
* ## Why This Hook Exists
*
* On 2026-01-23, the Ceetrix staging database was DELETED to work around a failed migration.
* The migration used table recreation to modify a CHECK constraint.
@boxabirds
boxabirds / no-agents.sh
Created January 13, 2026 07:23
No production! Bad agent! Prevent coding agents from running your production scripts
# Block non-interactive execution (prevents automation/scripts from running this)
if [ ! -t 0 ] || [ ! -t 1 ]; then
echo "ERROR: This script must be run interactively from a terminal."
echo ""
echo "Production deployments require human confirmation."
exit 1
fi
@sundowndev
sundowndev / GoogleDorking.md
Last active January 28, 2026 19:54
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active January 7, 2026 22:03
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@tomchentw
tomchentw / README.md
Last active June 22, 2025 20:09
Auto compress images with husky, lint-staged and imagemin

The flow

husky (setup git commit hooks) -> lint-stages (run specific commands by file type) -> imagemin (minify files)

git add -A
git commit # It will compress your images into git repo now

Since the images is now fully compressed, no extra steps is required by webpack/browserify……whatever.

@Geoff-Ford
Geoff-Ford / composing-software.md
Last active January 18, 2026 15:20
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@groteworld
groteworld / index.js
Last active June 5, 2020 14:49
Example aws/aws-sdk-js IotData API Lambda usage
// An usage of AWS.IotData in Lambdas
//
// This example assumes some things
// 1. That you have a environment variable AWS_IOT_ENDPOINT. This is the url that you can find in AWS IoT dashboard settings
// 2. The lambda and your aws iot devices are on the same account and region
const AWS = require('aws-sdk');
const iotData = new AWS.IotData({ endpoint: process.env.AWS_IOT_ENDPOINT });
const handler = (event, context) => {
@glebec
glebec / debugging.md
Last active May 31, 2023 21:18
Debugging

Debugging JavaScript Applications

A practical distillation for Fullstack Academy students

Faults in computer problems were theorized as far back as 1843, when Ada Lovelace noted of Babbage's Analytical Engine, "Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders." Almost 160 years later, NIST reported that software errors cost the US $59 billion annually. Clearly, some of the cards are wrong. However, unlike Grace Hopper's famous moth, most of the time the culprit is ourselves.

Debugging is a sanitization procedure consisting of:

  • Preventing bugs in the first place, through good practices and assistive tooling.
  • Detecting bugs when they first arise, through proper error handling and testing.

Vanilla javascript

  • A general smattering (too much to list, codewars problems are great practice!)

Database

  • If you want more detail refer to Gist: Sequelize-Express-Study-Guide
  • How to connect to connect to the database from node (i.e. connection string - protocol://address:port/dbName)

Model

  • Definition