This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# สร้าง key ชื่อ user_01 มีค่าเป็น somkiat และ key มีอายุ 60 วินาที | |
$echo -e 'set user_01 0 60 5\r\nsomkiat\r' | nc <server ip> 11211 | |
# ดึงข้อมูลด้วย key | |
$echo 'get user_01' | nc <server ip> 11211 | |
# ลบข้อมูลด้วย key | |
$echo 'delete user_01' | nc <server ip> 11211 | |
# ลบข้อมูลทั้งหมด |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from markitdown import MarkItDown | |
markitdown = MarkItDown() | |
result = markitdown.convert("ExecutionArchitectureApproachPaper.pdf") | |
print(result.text_content) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$go go build -o main main.go | |
$./main | |
# Before | |
Number of primes found: 50847534 | |
Time taken: 9.29 seconds | |
# After | |
Number of primes found: 50847534 | |
Time taken: 5.34 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ฝั่ง Redis-cli | |
127.0.0.1:6379> set counter 1 | |
OK | |
# ฝั่ง Server | |
Received: *3\r\n$3\r\nset\r\n$7\r\ncounter\r\n$1\r\n1\r\n | |
แสดงผลใน terminal | |
set | |
$7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$npx playwright screenshot --full-page "somkiat.cc" "screenshot.png" | |
ดูรายละเอียดเพิ่มเตอม | |
$npx playwright screenshot --help | |
Usage: npx playwright screenshot [options] <url> <filename> | |
capture a page screenshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. ติดตั้ง WasmEdge | |
$curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash | |
2. Download LLM model เพื่อมา run บนเครื่อง local โดยใช้งาน Llama 3.2, 1b | |
$curl -LO https://huggingface.co/second-state/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q5_K_M.gguf | |
3. ทำการ Download app chat มาใช้งาน เพื่อทดสอบการถามตอบกับ Local LLM server | |
$curl -LO https://github.com/second-state/LlamaEdge/releases/latest/download/llama-chat.wasm | |
4. ทำการ run app chat เพื่อใช้งาน model Llama 3.2, 1b ที่ทำการ download มา |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. ติดตั้ง SQLite database | |
$brew install uv git sqlite3 | |
// 2. สร้าง database และข้อมูลตัวอย่าง | |
# Create a new SQLite database | |
sqlite3 ./test.db <<EOF | |
CREATE TABLE products ( | |
id INTEGER PRIMARY KEY, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$brew install slides | |
$slides slide.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dotnet --version | |
9.0.100 | |
$dotnet new list | |
These templates matched your input: | |
Template Name Short Name Language Tags | |
-------------------------------------------- -------------------------- ---------- -------------------------------- | |
API Controller apicontroller [C#] Web/ASP.NET | |
ASP.NET Core Empty web [C#],F# Web/Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$export GEMINI_API_KEY=your-key | |
$python demo.py | |
ChatCompletionMessage( | |
content='I can definitely help you find a restaurant in Thailand! To give you the best recommendations, | |
I need a little more information. Tell me:\n\n* **Where in Thailand are you looking?** | |
(e.g., Bangkok, Chiang Mai, Phuket, etc.) \n* **What kind of cuisine are you interested in?** | |
(e.g., Thai, Italian, Japanese, street food, etc.)\n* **What is your budget?** | |
(e.g., budget-friendly, mid-range, high-end)\n* **What kind of atmosphere are you looking for?** | |
(e.g., romantic, lively, casual, etc.)\n\nOnce I have this information, |