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
Last active October 13, 2025 15:05
Hello Bun 1.3
$bun upgrade
Bun v1.3.0 is out! You're on v1.2.4
[6.15s] Upgraded.
Welcome to Bun v1.3.0!
What's new in Bun v1.3.0:
https://bun.sh/blog/release-notes/bun-v1.3.0
@up1
up1 / 1.py
Last active October 12, 2025 07:01
Hello Python 3.14
world = "World"
template = t"Hello, {world}"
print(type(template))
print(list(template))
print(template.strings)
print(template.values)
print(template.interpolations)
# ผลการ run
@up1
up1 / 1.txt
Last active October 10, 2025 01:19
Playwright Agents
# 1. ติดตั้งผ่าน Claude Code
$npx playwright init-agents --loop=claude
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Writing file: .claude/agents/playwright-test-generator.md
Writing file: .claude/agents/playwright-test-healer.md
Writing file: .claude/agents/playwright-test-planner.md
@up1
up1 / 1.sql
Last active October 2, 2025 13:10
PostgreSQL with unlogged table
CREATE UNLOGGED TABLE cache_data (
id serial PRIMARY KEY,
key text UNIQUE NOT NULL,
value jsonb,
created_at timestamp);
CREATE INDEX idx_cache_key ON cache_data (key);
@up1
up1 / 1.txt
Last active September 28, 2025 05:30
SubAgent with ClaudeCode
# 1. Initial Project
$claude doctor
$claude
$/init
# 2. Create subagent
$mkdir -p .claude/agents/backend
$vi backend.md
@up1
up1 / 1.txt
Last active September 27, 2025 08:41
PostgreSQL 18 with async read
# ตรวจสอบ version
SELECT version();
PostgreSQL 18.0 (Debian 18.0-1.pgdg13+3) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
# ดูการ config
SELECT name, setting, context, short_desc
FROM pg_settings
WHERE name LIKE 'io_%'
@up1
up1 / Jenkinsfile
Created September 27, 2025 05:33
Jenkins pipeline :: detect change by folder
def hasChanges(String path) {
return !sh(script: "git diff --name-only HEAD~1 HEAD | grep '${path}' || true", returnStdout: true).trim().isEmpty()
}
pipeline {
agent any
stages {
stage('Detect changes') {
steps {
@up1
up1 / 1.txt
Created September 26, 2025 15:56
GitHub Copilot CLI
$npm install -g @github/copilot
$copilot
┌── ──┐
│ ▄██████▄ │
Welcome to GitHub ▄█▀▀▀▀▀██▀▀▀▀▀█▄
█████┐ █████┐ █████┐ ██┐██┐ █████┐ ██████┐ ▐█ ▐▌ █▌
██┌───┘██┌──██┐██┌─██┐██│██│ ██┌──██┐└─██┌─┘ ▐█▄ ▄██▄ ▄█▌
██│ ██│ ██│█████┌┘██│██│ ██│ ██│ ██│ ▄▄███████▀▀███████▄▄
██│ ██│ ██│██┌──┘ ██│██│ ██│ ██│ ██│ ████ ▄ ▄ ████
└█████┐└█████┌┘██│ ██│██████┐└█████┌┘ ██│ ████ █ █ ████
@up1
up1 / 1.txt
Last active September 11, 2025 08:39
SDD with Spec-Kit
# 1. สร้าง project ด้วย Spec-kit เพื่อสร้าง specification ขึ้นมา
$uvx --from git+https://github.com/github/spec-kit.git specify init demo-api
███████╗██████╗ ███████╗ ██████╗██╗███████╗██╗ ██╗
██╔════╝██╔══██╗██╔════╝██╔════╝██║██╔════╝╚██╗ ██╔╝
███████╗██████╔╝█████╗ ██║ ██║█████╗ ╚████╔╝
╚════██║██╔═══╝ ██╔══╝ ██║ ██║██╔══╝ ╚██╔╝
███████║██║ ███████╗╚██████╗██║██║ ██║
╚══════╝╚═╝ ╚══════╝ ╚═════╝╚═╝╚═╝ ╚═╝
@up1
up1 / 1.txt
Created September 7, 2025 06:42
Elasticsearch :: Hybrid search
# Hybrid search
GET rag-langchain/_search
{
"retriever": {
"rrf": {
"retrievers": [
{
"standard": {
"query": {
"semantic": {