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 January 22, 2026 15:45
Ollama with Claude code
$ollama --version
ollama version is 0.14.3
$ollama list
NAME ID SIZE MODIFIED
functiongemma:latest 7c19b650567a 300 MB 4 weeks ago
gemma3:270m b16d6d39dfbd 241 MB 5 months ago
gemma3:1b 8648f39daa8f 815 MB 8 months ago
deepseek-r1:7b 0a8c26691023 4.7 GB 12 months ago
llama3.1:latest 91ab477bec9d 4.7 GB 17 months ago
@up1
up1 / 1.txt
Last active January 21, 2026 03:37
Vercel :: React Skill
$npx add-skill vercel-labs/agent-skills
Need to install the following packages:
add-skill@1.0.21
┌ skills
◇ Source: https://github.com/vercel-labs/agent-skills.git
@up1
up1 / 1.txt
Created January 18, 2026 09:00
Postgresql :: Skip Locked
WITH cte AS (
SELECT id FROM tasks WHERE status = 'pending' ORDER BY created_at ASC LIMIT 1 FOR UPDATE SKIP LOCKED
)
UPDATE tasks SET status = 'in_progress'
FROM cte
WHERE tasks.id = cte.id
RETURNING tasks.*;
@up1
up1 / 1.json
Last active January 13, 2026 07:13
Tips :: Claude Code
"PostToolUse": [
{
"matcher":"Write|Edit",
"hooks": [
{
"type": "command",
"command": "bun run format || true"
}
]
}
@up1
up1 / 1.txt
Last active December 24, 2025 15:31
Hello FunctionGemma model
$ollama list
NAME ID SIZE MODIFIED
functiongemma:latest 7c19b650567a 300 MB 15 minutes ago
$ollama run functiongemma
pulling manifest
pulling 415f8f959d80: 100% ▕██████████████████████████████████████████████████████████████████████████▏ 300 MB
pulling 64c834d5c134: 100% ▕██████████████████████████████████████████████████████████████████████████▏ 10 KB
pulling b536e845ddda: 100% ▕██████████████████████████████████████████████████████████████████████████▏ 26 B
pulling d087699a8829: 100% ▕██████████████████████████████████████████████████████████████████████████▏ 468 B
@up1
up1 / 1.txt
Last active December 23, 2025 17:47
Hello DHI
# 1. Build image
$docker image build -t demo:1.0 .
# 2. Scan image
$grype demo:1.0
✔ Loaded image demo:1.0
✔ Parsed image sha256:d9174a6052c58081feb46f149324030dc1b79fe3e084b0b3288912e22780de07
✔ Cataloged contents 994d063915c32eed9c71055bc892010324ddaa7ba517e6e94557c528128ccfd0
├── ✔ Packages [38 packages]
@up1
up1 / HelloControllerTest.java
Created December 2, 2025 09:15
Spring Boot test in Spring boot 4.0.0
package com.example.demotest;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.resttestclient.TestRestTemplate;
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureRestTestClient;
import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.web.servlet.client.RestTestClient;
@up1
up1 / 1.txt
Last active November 30, 2025 04:10
Kiro CLI
$curl -fsSL https://cli.kiro.dev/install | bash
Kiro CLI installer:
Downloading package...
✓ Downloaded and extracted
✓ Package installed successfully
🎉 Installation complete! Happy coding!
@up1
up1 / application.properties
Last active November 29, 2025 10:57
OpenTelemetry in Spring Boot 4
spring.application.name=otel
# For demo only
management.tracing.sampling.probability=1.0
management.otlp.metrics.export.step=10s
management.observations.annotations.enabled=true
management.opentelemetry.tracing.export.otlp.transport=http
@up1
up1 / compose.yml
Last active November 21, 2025 23:46
n8n queue mode
services:
postgres:
env_file:
- .env
image: postgres:18
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=n8n
- POSTGRES_DB=n8n