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 May 15, 2025 14:18
AWS Serverless app
# SAM CLI
$sam --version
SAM CLI, version 1.138.0
# Create Hello Project
$sam init --runtime java11 --dependency-manager maven --app-template hello-world --name sqs-lambda-test

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD
#1. Install
$go install github.com/tienanr/docurift/cmd/docurift@latest
# 2. Run docurift proxy server
$docurift -proxy-port 9876 -analyzer-port 9877 -backend-url http://localhost:8080 -max-examples 20
2025/05/12 16:45:00 Starting DocuRift with proxy port 9876 and analyzer port 9877
2025/05/12 16:45:00 Using backend URL: http://localhost:8080
2025/05/12 16:45:00 Starting analyzer server on :9877
2025/05/12 16:45:00 Starting proxy server on :9876
@up1
up1 / 1.txt
Created May 9, 2025 13:25
Pocket Flow Tutorial
$git clone https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge demo
$cd demo
$pip install -r requirements.txt
# ใช้งาน GEMINI_API_KEY
$export GEMINI_API_KEY=<your key>
# ลองใช้งาน Pocket Flow Tutorial
python main.py --repo https://github.com/username/repo --include "*.py" "*.js" --exclude "tests/*" --max-size 50000
@up1
up1 / 1.txt
Last active May 7, 2025 09:20
Vector Sets in Redis 8 (preview version)
# Add datas
$VADD mydata VALUES 4 0.5 1.2 0.75 3.8 "I love dogs"
$VADD mydata VALUES 4 0.5 1.2 0.75 3.8 "I like cats"
$VADD mydata VALUES 4 0.5 1.2 0.75 3.8 "I enjoy birds"
# Show embedding data
$VEMB mydata "I love dogs"
$VEMB mydata "I like cats"
$VEMB mydata "I enjoy birds"
@up1
up1 / demo.py
Created May 7, 2025 02:57
Web UI test with Alumnium
from alumnium import Alumni
from selenium.webdriver import Chrome
driver = Chrome()
driver.get("https://seleniumbase.io/coffee/")
al = Alumni(driver)
al.check("Espresso is on the menu")
al.do("Choose 'Espresso' from the menu")
al.check("Cart have 1 item")
@up1
up1 / 1.yml
Last active May 6, 2025 06:32
Go-A/uto Instrumentation
services:
go-api:
build:
context: ./api-go
dockerfile: Dockerfile
pid: "host"
ports:
- 1323:1323
volumes:
- /proc:/host/proc
@up1
up1 / 1.txt
Last active May 5, 2025 01:35
Docker MCP Catalog and toolkit
# Pull image
$docker image pull mcp/postgres
Using default tag: latest
latest: Pulling from mcp/postgres
6e771e15690e: Already exists
6943333fe3c9: Downloading 23.82MB/49.62MB
19f059763ac0: Download complete
422fec2897b5: Download complete
3beeba27d5a1: Download complete
@up1
up1 / 1.txt
Last active May 2, 2025 12:03
MCP Server with MongoDB and Redis
$git clone https://github.com/redis/mcp-redis.git
$cd mcp-redis
$docker image build -t mcp-redis .
@up1
up1 / 1.txt
Last active April 30, 2025 16:39
Robot Framework Dashboard
# 1. ติดตั้ง
$pip install robotframework-dashboard
# 2. Run test
$robot demo.robot
# 3. Generate report
$robotdashboard -o output.xml
======================================================================================