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 June 26, 2026 15:24
Deno Desktop
$deno upgrade
$deno --version
deno 2.9.0 (stable, release, aarch64-apple-darwin)
v8 14.9.207.2-rusty
typescript 6.0.3
@up1
up1 / 1.txt
Last active June 23, 2026 15:39
Browser Use Skills
# 1. ติดตั้ง Skills ใน Claude Code แบบ user scope บน MacOS
$mkdir -p ~/.claude/skills/browser-use
$curl -o ~/.claude/skills/browser-use/SKILL.md https://raw.githubusercontent.com/browser-use/browser-use/main/skills/browser-use/SKILL.md
# 2. ใช้งานผ่าน Claude Code
❯ /browser-use how to use ?
⏺ The browser-use skill is a CLI for fast browser automation. A background daemon keeps the browser open between
commands (~50ms latency). Here's how to use it:
@up1
up1 / 1.txt
Last active June 21, 2026 03:52
UUID in go 1.27
$go install golang.org/dl/go1.27rc1@latest
$go1.27rc1 download
$go version
go version go1.27rc1 darwin/arm64
@up1
up1 / 1.txt
Created June 14, 2026 17:46
Demo prompt
# ROLE & GOAL
You are my executive assistant. Triage my inbox to clear out noise and surface high-priority items. Do not send any emails automatically; save all responses as drafts.
# STEP 1: CATEGORIZE
Analyze each unread email and assign it to one of these categories:
- PRIORITY: Direct client requests, urgent team questions, or action items with deadlines.
- FYI: Internal updates, project status reports, or informational emails requiring no action.
- IGNORE: Newsletters, generic promotions, or automated system alerts.
# STEP 2: TAKE ACTION
@up1
up1 / 1.json
Created June 10, 2026 08:22
Demo SBOM for nodejs
{
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"version": 1,
"serialNumber": "urn:uuid:eb4d5f8f-8960-48e3-b2b1-78851025f1b0",
"metadata": {
"timestamp": "2026-06-10T08:12:33.759Z",
"tools": {
"components": [
@up1
up1 / 1.json
Created June 10, 2026 08:13
Demo SBOM for nodejs
{
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"version": 1,
"serialNumber": "urn:uuid:eb4d5f8f-8960-48e3-b2b1-78851025f1b0",
"metadata": {
"timestamp": "2026-06-10T08:12:33.759Z",
"tools": {
"components": [
@up1
up1 / 1.txt
Last active June 5, 2026 16:20
Demo Redis with SQL
$docker container run -d -p 6379:6379 redis:8.8
$docker container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
89bdbf4df9c9 redis:8.8 "docker-entrypoint.s…" 15 seconds ago Up 15 seconds 0.0.0.0:6379->6379/tcp, [::]:6379->6379/tcp pensive_mendel
@up1
up1 / 1.txt
Created June 4, 2026 08:13
Demo Postman
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response time is less than 1sec", function () {
pm.expect(pm.response.responseTime).to.be.below(1000);
});
pm.test("Response matches JSON schema", function () {
const schema = {
@up1
up1 / 1.ts
Last active June 4, 2026 07:28
Demo code
import { test, expect } from '@playwright/test';
test('Buy coffee with Espresso and Americano, total $17', async ({ page }) => {
await page.goto('https://seleniumbase.io/coffee/');
await page.locator('[data-test="Espresso"]').click();
await page.locator('[data-test="Americano"]').click();
await expect(page.getByLabel('Cart page')).toContainText('cart (2)');
await page.getByRole('link', { name: 'Cart page' }).click();
await expect(page.locator('[data-test="checkout"]')).toContainText('Total: $17.00');
await page.locator('[data-test="checkout"]').click();
@up1
up1 / 2.txt
Last active May 30, 2026 01:25
Demo with http file and ijhttp
$ijhttp demo.http
┌─────────────────────────────────────────────────────────────────────────────┐
│ Running IntelliJ HTTP Client with │
├────────────────────────┬────────────────────────────────────────────────────┤
│ Files │ demo.http │
├────────────────────────┼────────────────────────────────────────────────────┤
│ Public Environment │ │
├────────────────────────┼────────────────────────────────────────────────────┤
│ Private Environment │ │