Skip to content

Instantly share code, notes, and snippets.

View up1's full-sized avatar

Somkiat Puisungnoen up1

View GitHub Profile
@up1
up1 / mcp.json
Created April 2, 2026 12:43
Draw.io MCP
{
"servers": {
"drawio": {
"command": "npx",
"args": ["@drawio/mcp"]
}
}
}
@up1
up1 / 1.txt
Created March 27, 2026 16:27
Cline Kanban
$npm i -g cline
$cline
@@
@@@@@@
@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@
@@@@@ @@@@ @@@@@
@@@@@@ *@@@ @@@@@@
@up1
up1 / 1.txt
Last active March 22, 2026 15:33
Playwright Skill for API Testing
$npx skills add testdino-hq/playwright-skill
███████╗██╗ ██╗██╗██╗ ██╗ ███████╗
██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝
███████╗█████╔╝ ██║██║ ██║ ███████╗
╚════██║██╔═██╗ ██║██║ ██║ ╚════██║
███████║██║ ██╗██║███████╗███████╗███████║
╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚══════╝
@up1
up1 / 1.txt
Last active March 22, 2026 04:14
API testing with Schemathesis
$uvx schemathesis run https://petstore.swagger.io/v2/swagger.json --checks all
Installed 41 packages in 55ms
Schemathesis v4.12.2
━━━━━━━━━━━━━━━━━━━━
✅ Loaded specification from https://petstore.swagger.io/v2/swagger.json (in
2.73s)
Base URL: https://petstore.swagger.io/v2
Specification: Open API 2.0
@up1
up1 / 1.txt
Last active March 20, 2026 06:51
Hello Java 26
// Java 25
$java -version
openjdk version "25" 2025-09-16
OpenJDK Runtime Environment (build 25+35-3488)
OpenJDK 64-Bit Server VM (build 25+35-3488, mixed mode, sharing)
$java Hello.java
Hello
Goodbye
@up1
up1 / after.go
Last active March 17, 2026 13:00
Go reduce size of binary
package main
import (
"fmt"
)
type HeavyService struct{}
func (s *HeavyService) MethodA() { fmt.Println("A") }
func (s *HeavyService) MethodB() { fmt.Println("B") } // This will be stripped if unused
@up1
up1 / 1.txt
Last active March 14, 2026 08:53
Hello Qwen Code
$bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)" -s --source qwenchat
==========================================
Qwen Code Installation Script
==========================================
ℹ️ System: Darwin 25.2.0
ℹ️ Shell: zsh
@up1
up1 / 1.py
Last active March 12, 2026 09:12
Demo with Gemini Embedding 2 preview
from google import genai
from google.genai import types
MODEL_ID = "gemini-embedding-2-preview"
client = genai.Client() # Assumes that the environment variable GOOGLE_API_KEY is set
# This example shows how to embed both text and an image using the Gemini embedding model.
with open("gemini-embedding-2.jpg", "rb") as f:
image_bytes = f.read()
@up1
up1 / 1.txt
Last active March 8, 2026 10:33
Install OpenClaw with Ollama
# 1. ติดตั้ง Ollama
$curl -fsSL https://ollama.com/install.sh | sh
# 2. Check version ต้องเป็น v 0.17 ขึ้นไปเท่านั้น
$ollama -v
ollama version is 0.17.7
# 3. ทำการติดตั้ง OpenClaw ผ่าน Ollama model
# โดยใช้งาน kimi model บน cloud
# https://ollama.com/library/kimi-k2.5
@up1
up1 / 1.txt
Last active March 8, 2026 06:45
Install openClaw
# ในการใช้งาน ไม่ควรใช้ root user นะครับ
# ดังนั้นให้ทำการสร้าง non-root user เข้ามาก่อนติดตั้ง เพื่อความปลอดภัย
$sudo adduser openclaw
$sudo usermod -aG sudo openclaw
$su openclaw
# NodeJS 22+
$npm install -g openclaw@latest