Skip to content

Instantly share code, notes, and snippets.

View mehh's full-sized avatar
🎯
Focusing

Kris Chase mehh

🎯
Focusing
View GitHub Profile
@mehh
mehh / OWASP-Top-10-Agent-Security-Audit-Prompt.md
Created October 23, 2026 04:43
Agent prompt: OWASP Top 10 security audit + remediation plan (defensive). Paste into Cursor/Claude Code/Codex.

Agent Security Audit Prompt — OWASP Top 10 (2026)

How to use: Paste this entire document into Cursor, Claude Code, Codex, or any coding agent with repo access. Point it at your application root. Do not ask it to exploit production. This is a defensive audit: find issues, prove them safely, and ship a remediation plan.


Mission

You are a senior application security engineer. Perform a thorough read-only-first security audit of this codebase against the OWASP Top 10 (current / 2025–2026 edition) plus modern failure modes common in AI-assisted ("vibe coded") apps.

@mehh
mehh / 00-README.md
Last active October 11, 2026 22:52
isometric-objects: a free skill for drawing isometric figures and seamless loops with code (Claude Code / Cursor / Codex)

isometric-objects: a free skill for drawing isometric figures with code

A skill file you drop into Claude Code, Cursor, or Codex. Ask for an object, get a clean isometric figure in the dark hairline "technical drawing" style, as SVG or canvas code. Ask for motion, get a seamless loop.

Everything in this gist was made with it. No hand-drawn lines.

Install

Claude Code (personal, all projects):

@mehh
mehh / functions.php
Created March 4, 2019 16:52
Remove Inline Styles from WordPress the_content();
add_filter('the_content', function( $content ){
//--Remove all inline styles--
$content = preg_replace('/ style=("|\')(.*?)("|\')/','',$content);
return $content;
}, 20);
@mehh
mehh / magento_cart_price_rule.sql
Created January 28, 2019 23:37
Magento1 Cart Price Rule SQL
// https://magento.stackexchange.com/questions/40649/magento-direct-sql-query-for-coupon-based-orders
SELECT coupon_rule_name AS 'Promotion Used'
, coupon_code AS 'Code Used'
, COUNT(coupon_code) AS 'Times Used / Number of Orders'
, SUM(subtotal) AS 'Cumulative Price'
, SUM(total_paid) AS 'Cumulative Paid with Coupon'
, AVG(total_paid) AS 'Average Order Total (W/ Coupon)'
, AVG(subtotal) AS 'Average Order Total (W/O Coupon)'
@mehh
mehh / gravity_forms_clamav.php
Created October 13, 2017 18:13
Scan Gravity Forms uploads with ClamAV - WordPress Raw
/**
* Scan Gravity Forms uploads with ClamAV
* Based on 'Custom Scan AV function by Kris Chase'
* https://krischase.com/detect-and-prevent-malware-in-gravity-forms-file-upload-with-php-clamav/
* Requires clamav and php-clamav installed and enabled
*/
function myfunc_uploads_clamav( $validation_result ) {
if ( $_FILES ) {
$form = $validation_result['form'];
@mehh
mehh / couponUsage.sql
Created June 2, 2016 15:38
Export list of transaction IDs, Customer IDs and coupon codes used for Magento Orders
SELECT sfo.customer_id AS customer, ce.email, GROUP_CONCAT(cev.value SEPARATOR ' ') as name,
sfo.entity_id, sfo.increment_id,scu.times_used,sc.coupon_id,sc.rule_id,sc.code FROM sales_flat_order sfo
LEFT JOIN salesrule_coupon_usage scu ON sfo.customer_id = scu.customer_id LEFT JOIN salesrule_coupon sc
ON sc.coupon_id = scu.coupon_id LEFT JOIN customer_entity ce ON ce.entity_id = sfo.customer_id
LEFT JOIN customer_entity_varchar cev ON cev.entity_id = sfo.customer_id WHERE (cev.attribute_id IN (5,7)
OR cev.attribute_id IS NULL) GROUP BY sfo.increment_id ORDER BY sfo.increment_id;
@mehh
mehh / wpcron-post-status.sh
Created May 14, 2016 05:46
Unpublish page or post automatically at given time using wpcli and cron
59 23 * * * /usr/local/bin/wp post update 1310 --post_status=draft --path="/home/username/public_html/"
#! /bin/bash
#----------------------------------------------------------------------------------------------#
# addMonitorToUptimeRobot.sh v1.0 (#0 2016-05-05) #
# #
# This script will loop through all users on WHM server, #
# retreive associated domains and add them to Uptime Robot #
############################## Modification Log ############################## #
# Date Who Version Description #
# 20160505 KChase 1.0 Initial Release #
#!/bin/bash
# Script by Kris Chase
# http://krischase.com
#
# robotsDeploy.sh is a script which will take a templated robots.txt file
# and deploy it to all users accounts on the current system
# Meant for systems running WHM
#Initialize variables counters.
v_cpanel_accounts=0