Skip to content

Instantly share code, notes, and snippets.

View up1's full-sized avatar

Somkiat Puisungnoen up1

View GitHub Profile
@up1
up1 / 1.txt
Created August 4, 2026 07:42
Demo skills
---
name: angular-dev
description: Web developer with Angular framework
---
## Workflow of Angular Developer
1. Understand the requirements and design + planning the application architecture based on user requirements
2. Read and analyze Mock User interface from user
3. Create Angular components, services, and modules based on the requirements
4. Implement routing and navigation between different features
@up1
up1 / index.test.ts
Created August 3, 2026 07:07
Cloudflare Test Harness
import { createTestHarness } from "wrangler";
import { beforeAll, afterEach, afterAll, test } from "vitest";
// Initialize the test harness pointing to your Cloudflare Worker config
const server = createTestHarness({
workers: [
{ configPath: "./wrangler.jsonc" } // or wrangler.toml
],
});
@up1
up1 / 1.md
Created August 2, 2026 06:56
MCP 2.0
sequenceDiagram
    participant C as MCP Client
    participant LB as Load Balancer
    participant A as MCP Server A
    participant B as MCP Server B
    participant S as Session Store

    C->>LB: initialize()
 LB->>A: initialize()
@up1
up1 / 1.txt
Created August 1, 2026 05:30
Claude Desktop Disk Usage and Clean
$du -sh * | sort -rh
10.0G vm_bundles
5.1G Cache
245M claude-code-vm
245M claude-code
@up1
up1 / 1.txt
Last active July 30, 2026 05:55
Codex Security CLI
// Install in prject
$npm install @OpenAI/codex-security
// Run
$npx @openai/codex-security scan --help
codex-security scan — Run a Codex Security scan.
Usage: codex-security scan [repository] [options]
Arguments:
@up1
up1 / 1.js
Last active July 29, 2026 14:44
NodeJS :: Good testing
beforeAll(async () => {
await seedDatabase();
});
describe("GET /users", () => {
test("user exists", async () => {
...
});
@up1
up1 / 1.json
Created July 29, 2026 05:38
Hello hooks
{
"hooks": {
"PreToolUse": [
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "python ~/.claude/hooks/dedupe_read.py"
}
@up1
up1 / 1.txt
Last active July 27, 2026 07:57
Hello Pi Coding Agent
# 1. ติดตั้ง Pi
$curl -fsSL https://pi.dev/install.sh | sh
$pi update
$pi --version
0.82.1
# 2. Buildins tools
read - Read file contents
bash - Execute bash commands
edit - Edit files with find/replace
@up1
up1 / 1.txt
Last active July 26, 2026 05:23
TypeScript 7
$npm install -g typescript
$tsc -version
Version 7.0.2
$npm install -g typescript@npm:@typescript/typescript6
$tsc6 -version
Version 6.0.3
@up1
up1 / 1.go
Last active July 24, 2026 16:35
Golang :: Compare JSON Serializer
// 1. SonicSerializer implements echo.JSONSerializer using bytedance/sonic
type SonicSerializer struct{}
// Serialize converts a Go object into a JSON byte slice and writes it to the context
func (s SonicSerializer) Serialize(c echo.Context, i interface{}, indent string) error {
enc := sonic.ConfigDefault.NewEncoder(c.Response())
if indent != "" {
enc.SetIndent("", indent)
}
return enc.Encode(i)