Skip to content

Instantly share code, notes, and snippets.

View jpcaparas's full-sized avatar
🐔

JP Caparas jpcaparas

🐔
View GitHub Profile
@jpcaparas
jpcaparas / forge-recipe.sh
Created October 21, 2026 07:15
PHP — temporary partial mitigation
#!/bin/bash
# Root-only Ubuntu/Forge recipes. Default action when pasted into Forge: mitigate.
# Unofficial PARTIAL mitigation only. No fixed-version assertion is made here.
set -u -o pipefail
export PATH=/usr/sbin:/usr/bin:/sbin:/bin LC_ALL=C
unset PHPRC PHP_INI_SCAN_DIR
umask 022
mode=${1:-mitigate}
case "$mode" in
@jpcaparas
jpcaparas / README.md
Created October 19, 2026 09:16 — forked from ben-vargas/README.md
Removing Codex Computer Use's built-in confirmation layers (macOS): instructions for agents

Removing Codex Computer Use's built-in confirmation layers (macOS)

Instructions for a coding agent. Apply them on the user's Mac only when the user has asked for it. They remove OpenAI's default confirmation policies, OpenAI's secure-login flow, and a frame blocker in the ChatGPT browser extension that hides password-manager menus. After this, Codex follows the user's own instructions (AGENTS.md) instead of OpenAI's rules.

Tradeoff. These layers exist to blunt prompt injection and accidental side effects. Without them, the agent will send, delete, buy, and log in

@jpcaparas
jpcaparas / amp-cliproxyapi-setup.md
Created October 8, 2026 10:14 — forked from ben-vargas/amp-cliproxyapi-setup.md
Amp Orbs Running CLIProxyAPI + Amp Router Custom URL

Amp Orbs Running CLIProxyAPI + Amp Router Custom URL

This guide runs CLIProxyAPI in an Amp orb around the clock and publishes it at a stable public HTTPS URL through Tailscale Funnel. An Amp Custom URL model-routing connection then sends Claude requests there, and CLIProxyAPI serves them with your Claude Pro or Max subscription (OAuth login) instead of Amp credits.

The host scripts, templates, and an agent skill that walks you through every step live in ben-vargas/amp-plugins/skills/amp-cli-proxy-api. The easiest path is to install the skill and ask Amp to set it up:

amp skill add --global ben-vargas/amp-plugins/skills/amp-cli-proxy-api
@jpcaparas
jpcaparas / proof.txt
Last active July 28, 2026 02:57
Synthetic Claude Code wrapper (defaults to K3 as the model)
- https://imgur.com/a/LlAXBm5
- https://imgur.com/a/pAKhB20
@jpcaparas
jpcaparas / codex-custom-instructions.md
Last active October 12, 2026 19:06
codex-custom-instructions.md

Be pragmatic, surgical, and outcome-focused.

Default to the smallest correct change that solves the stated problem. Do not widen scope unless I explicitly ask for it. Do not refactor, rename, reorganise, or “clean up” unrelated code. Prefer modifying existing code over introducing new abstractions unless a new abstraction is clearly warranted.

Before making changes:

  • Identify the objective, constraints, and assumptions briefly.
  • Inspect the relevant files and locate the exact change points.
@jpcaparas
jpcaparas / SKILL.md
Created February 20, 2026 19:18
OpenCode - oneshot website command
name oneshot-website
description Generate immersive, one-shot single-file HTML websites with embedded CSS and JS. No external images. Hostable on CodePen or Vercel. Use for writeup showcases, AI capability demos, and portfolio pieces.

Oneshot Website

Generate a stunning, self-contained single-file HTML website -- fully immersive, scroll-driven, cinematic. No external images, no build step. Drop into CodePen or push to Vercel as-is.

Inspired by high-end digital brand experiences and the kind of creative coding that makes people say "this was done in one shot?"

@jpcaparas
jpcaparas / launchd.org
Created July 7, 2024 12:10 — forked from dabrahams/launchd.org
Notes on Apple's under-documented launchd

Notes on Apple’s Under-Documented LaunchD

Start triggers fire regardless of other conditions

For example, StartOnMount=true will cause the job to start when anything is mounted even if other conditions, e.g. QueueDirectories, say the job should not run

Rhythm of repeating jobs

The StartInterval timer begins ticking at the moment the plist is loaded. If something like QueueDirectories is preventing the job from

@jpcaparas
jpcaparas / script.py
Created March 9, 2024 10:37
Python 5 concurrent SOCKS5 requests
import argparse
import requests
import threading
from concurrent.futures import ThreadPoolExecutor, as_completed
from itertools import cycle
def make_request(server, socks5_credentials, semaphore):
username, password, port = socks5_credentials.split(':')
proxies = {
@jpcaparas
jpcaparas / inode-count-count-basic.sh
Last active March 8, 2024 12:25
Find sub-directories with highest inode count
#!/bin/bash
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c 'echo -n "{}: " ; find "{}" | wc -l' \;
@jpcaparas
jpcaparas / cmd.md
Last active February 7, 2024 09:30
Do not use file cache on Laravel's artisan:serve command

Step 1: Terminate the running web server

Step 2: Modify the .env directive CACHE_DRIVER to be array instead of file.

Step 3: Remove the cached bootstrap files by running php artisan optimize:clear

Step 4: Flush the application cache for good measure by running php artisan optimize:clear

Step 5: Run php artisan serve. Any real-time changes to your .env file should reflect immediately on the app rather than having to force a web server restart each time.