Skip to content

Instantly share code, notes, and snippets.

View jongan69's full-sized avatar
🥀

Jonathan Gan jongan69

🥀
View GitHub Profile
@jongan69
jongan69 / AGENTS.md
Created August 3, 2026 23:24
AGENTS.md — Engineering Operating Manual for autonomous coding agents

AGENTS.md

Engineering Operating Manual

This document defines how autonomous coding agents should work in this repository.

The goal is not to maximize code written.

The goal is to produce the correct solution with the minimum amount of code, complexity, risk, and maintenance cost.

@jongan69
jongan69 / implementation-first-engineering-system-prompt.md
Created August 3, 2026 22:28
Implementation-First Engineering System Prompt — a system prompt for an autonomous engineering agent that turns every request into an implementation-ready issue before writing code

Implementation-First Engineering System Prompt

You are a senior staff software engineer, software architect, QA lead, product manager, and technical writer working as a single autonomous engineering agent.

Your objective is not to write code.

Your objective is to solve problems correctly.

Implementation is only one step in that process.

@jongan69
jongan69 / vid2clips.sh
Created June 20, 2026 13:14
a bash script for turning long videos into 15 second clips
#!/usr/bin/env bash
set -euo pipefail
SNIPPET_SECONDS=15
RECURSIVE=0
COPY_MODE=0
COPY_ORIGINAL=0
usage() {
cat <<'USAGE'
@jongan69
jongan69 / pagespeed.js
Created November 18, 2025 04:06
CLI Github runnable action for observing page speed and seo
#!/usr/bin/env node
/**
* PageSpeed Insights CLI Tool (Node.js)
* No API key required • Supports mobile & desktop
* Works in GitHub Actions
*/
import https from 'https';
import { config } from 'dotenv';
@jongan69
jongan69 / optimize-logo.sh
Created November 18, 2025 04:05
Bash script for optimizing logo in public folder of app
#!/bin/bash
# Script to optimize logo.png for web performance
# This script requires ImageMagick or similar tools
LOGO_FILE="public/logo.png"
OUTPUT_FILE="public/logo-optimized.png"
echo "Optimizing logo.png for web performance..."
@jongan69
jongan69 / youtube-to-transcript-text.js
Created October 26, 2025 02:52
A browser console log script for getting the transcript from a video
(() => {
// Select all transcript segments
const segments = document.querySelectorAll('ytd-transcript-segment-renderer');
if (!segments.length) {
console.error("❌ No transcript segments found. Make sure the transcript panel is open.");
return;
}
// Extract only the text from each segment
@jongan69
jongan69 / Principles.md
Created August 21, 2025 10:15
Good Prompts

Make sure the following code follows these principles for clean, efficient, and maintainable code.

KISS: Keep It Simple, Stupid - Keep your code simple to avoid complexity and maintainability issues.

DRY: Don't Repeat Yourself - Avoid code duplication to reduce maintenance and debugging efforts.

YAGNI: You Aren't Gonna Need It - Avoid unnecessary code that you won't use later.

SOLID: Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle - A framework for building maintainable and scalable software.

@jongan69
jongan69 / package.json
Last active August 20, 2025 17:22
my expo router package.json scripts
"scripts": {
"start": "expo start",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"android": "expo run:android",
"ios": "expo run:ios",
"android:dev": "expo run:android --device",
"ios:dev": "expo run:ios --device",
"web": "expo start --web",
"deploy": "npx expo export -p web && npx eas-cli@latest deploy",
@jongan69
jongan69 / powerpoint.py
Created December 26, 2024 19:21
Turn all of your github repos from the past year into a powerpoint
import os
# Set tokenizers parallelism before importing transformers
os.environ["TOKENIZERS_PARALLELISM"] = "false"
import subprocess
import json
import random
import requests
from pptx import Presentation
from pptx.util import Pt, Inches
@jongan69
jongan69 / Cargo.toml
Last active March 5, 2025 03:49
Example Solana Rust Lottery Program
[package]
name = "lottery"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "lottery"