Skip to content

Instantly share code, notes, and snippets.

View nghyane's full-sized avatar

Hoàng Văn Anh Nghĩa nghyane

View GitHub Profile
@nghyane
nghyane / README.md
Last active July 25, 2026 05:54
edgekit — tiny self-hosted popunder ad loader for content sites (round-robin, tab-under, retention-first)

edgekit

Tiny (~5 KB) self-hosted popunder ad loader for content sites (manga/anime readers, streaming, forums). One static file, zero dependencies: round-robin across your ad networks, fire-on-click, idle-time injection (no LCP hit), optional per-network daily/hourly cap-skip, and an undetectable per-network audit counter.

Built by reverse-engineering how popunder networks (BetterJsPop/HilltopAds, AdMaven) actually behave, then tuning against real reader behavior. Not a network — a loader you point at your own ad networks.

Model in one line

Enter page → click → pop fires. Next page → click → pop fires. Each page-load serves the next network in your list (round-robin), re-injected fresh. No artificial session cap — pacing is left to each network's own dashboard (where it belongs).

@nghyane
nghyane / gist:ec94d4085fef45da64676bf64c49988a
Created March 14, 2026 14:46
Setup Sunshine + Moonlight remote desktop on Ubuntu via Tailscale SSH
# 🖥️ Remote Desktop Ubuntu với Sunshine + Moonlight qua Tailscale
## Yêu cầu
- PC Ubuntu có GPU (NVIDIA/AMD/Intel)
- Tailscale đã cài trên cả 2 máy
- SSH access qua Tailscale
## 1. Cài Sunshine trên Ubuntu (qua SSH)
```bash
@nghyane
nghyane / chapter_gist.md
Created March 13, 2026 04:51
ComicScan: My Possession Ch.20 (ko→vi) — 19 rendered pages

ComicScan Output: My Possession Became a Ghost Story — Ch.20

Pipeline: PP-OCR det → PP-OCR rec → translate (ko→vi) → fit → LaMa inpaint → render

Page Output
00
01
02
03
@nghyane
nghyane / page_007.jpg.b64.txt
Created March 13, 2026 04:50
ComicScan: My Possession Ch.20 (ko→vi) — pages 07-12 (base64 jpg)
This file has been truncated, but you can view the full file.
@nghyane
nghyane / page_000.jpg.b64.txt
Created March 13, 2026 04:50
ComicScan: My Possession Ch.20 (ko→vi) — pages 00-06 (base64 jpg)
This file has been truncated, but you can view the full file.
@nghyane
nghyane / manga-extension-no-server-v1-spec.md
Last active March 11, 2026 12:06
Manga/Webtoon Translator No-Server V1 Spec

Manhwa Translator - No-Server V1 (Self-Use First)

Version: v1.4-selfuse Date: 2026-03-11 Principle: Build for yourself first. When you forget it's your own tool, it's ready for user #2.


1) Reverse Constraints

@nghyane
nghyane / api-doc.md
Last active March 11, 2026 16:12
ampcode-connector API

ampcode-connector API

Base URLs

Anthropic: http://5.223.45.83:7860/api/provider/anthropic/v1
OpenAI:    http://5.223.45.83:7860/api/provider/openai/v1

Auth: none — proxy tự inject OAuth token.

@nghyane
nghyane / devtools-compare-plan.md
Created March 3, 2026 07:05
DevTools Compare — Project Plan (SolidStart + AdSense + Affiliate)

DevTools Compare — Project Plan

Tổng quan

Site so sánh dev tools với programmatic SEO, monetize bằng AdSense (baseline) + Affiliate (primary revenue).

  • Stack: SolidStart (SSG) + Tailwind + MDX
  • Deploy: Cloudflare Pages (free)
  • Content: Agent-generated, template-driven
  • Target: 200+ trang trong tháng đầu
@nghyane
nghyane / blog-codebase-audit-with-ai.md
Created February 26, 2026 06:59
Codebase Audit với AI Coding Agent: Prompt như thế nào để không bỏ sót

Codebase Audit với AI Coding Agent: Prompt như thế nào để không bỏ sót

Hầu hết developer dùng AI coding agent để viết code. Ít ai dùng nó để xóa code. Đây là bài viết về việc sử dụng AI agent (Claude Code, Cursor, v.v.) để tìm và loại bỏ dead code, stale architecture, wrapper pattern thừa — và cách prompt sao cho kết quả thực sự toàn diện.

Vấn đề: Grep không phải là proof

Cách phổ biến nhất để tìm dead code: grep tên function, thấy 0 kết quả, kết luận nó dead. Sai.

  • Grep không hiểu re-exports. export { X } from "./foo" rồi import { X } from "./barrel" — grep tìm "foo" sẽ bỏ qua consumer thật.
  • Grep không phân biệt type-only import vs runtime import. Symbol có thể được import bởi 10 files nhưng chỉ dùng ở type position — runtime code vẫn dead.
@nghyane
nghyane / blog-codemode.md
Created February 21, 2026 07:50
Code Mode: Khi LLM viết code để điều khiển tools

Code Mode: Khi LLM viết code để điều khiển tools

Vấn đề

AI coding agent hoạt động bằng cách gọi tools — đọc file, chạy lệnh, tìm kiếm. Mỗi lần gọi là một round-trip tới LLM, và mỗi round-trip gửi lại toàn bộ context: system prompt, lịch sử hội thoại, định nghĩa tools.

Một task đơn giản — đọc 3 file rồi grep — tốn 4 round-trips. Context phình ra theo từng lượt:

LLM → read(file1)    → 50k tokens