Skip to content

Instantly share code, notes, and snippets.

View pingkunga's full-sized avatar
🎯
Focusing

Chatri Ngambenchawong pingkunga

🎯
Focusing
View GitHub Profile
# Jacket Advisor Agent
You are a friendly personal advisor helping people decide if they need a jacket. You're connected to text-to-speech, so keep your responses conversational and brief - like you're chatting with a friend.
## Your Role
Help the user decide if they should bring a jacket based on weather conditions, for their upcoming trip.
## Available Tools
- Weather MCP server: Access current weather and 7-day forecasts using latitude/longitude coordinates
@pingkunga
pingkunga / package.json
Created February 18, 2026 10:44
Nuxt Error @oxc-parser/binding-linux-x64-gnu (Fixed)
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
@pingkunga
pingkunga / package.json
Created February 18, 2026 10:39
Nuxt Error @oxc-parser/binding-linux-x64-gnu
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
@pingkunga
pingkunga / sampleMergeXtraReport.cs
Last active February 11, 2026 06:50
sampleMergeXtraReport.cs
using DevExpress.XtraReports.UI;
// 1. Initialize your reports
XtraReport report1 = new XtraReport1();
XtraReport report2 = new XtraReport2();
// 2. Generate the pages for both reports
report1.CreateDocument();
report2.CreateDocument();
@pingkunga
pingkunga / YahooFinanceAPIWithSemanticKernel.cs
Created November 3, 2025 21:54
YahooFinanceAPIWithSemanticKernel
[KernelFunction]
[Description("Get basic market outlook from Yahoo Finance")]
public async Task<string> GetMarketOutlookAsync()
{
try
{
var url = "https://query1.finance.yahoo.com/v8/finance/chart/^GSPC?range=1d&interval=1d";
var response = await _httpClient.GetAsync(url);
response.EnsureSuccessStatusCode();
var data = await response.Content.ReadAsStringAsync();
@pingkunga
pingkunga / index.js
Created November 1, 2025 09:43
new-curator call Gemini to summary new in Thai Past 24 hr
import express from "express";
import dotenv from "dotenv";
import { GoogleGenAI } from "@google/genai";
const app = express();
app.use(express.json());
dotenv.config();
const port = process.env.PORT || 3000;
const apiKey = process.env.GEMINI_API_KEY;
const geminiAI = new GoogleGenAI({apiKey});
@pingkunga
pingkunga / LottoPlugin.cs
Created August 18, 2025 04:36
GetPrize2DigitHistoryAsync
#region> LottoAPI Integration
/// <summary>
/// Gets the prize 2 digit history from the LottoAPI with optional month and day
/// filters
/// </summary>
/// <param name="month">Optional month filter (1-12)</param>
/// <param name="day">Optional day filter (1-31)</param>
/// <returns>Prize 2 digit history as a JSON string</returns>
[KernelFunction]
@pingkunga
pingkunga / n8n_line_ai
Created August 13, 2025 13:37
สำหรับท่านใดที่ส่งข้อความหา line เพื่อตอบกลับจาก Ai agent แล้วบางกรณีติด * หรือ \ กวนใจ แนะนำ อันนี้เลยครับ เครียร์สะอาดมาก
let text = items[0].json.output;
// ลบโค้ดหลายบรรทัด
text = text.replace(/```[\s\S]*?```/g, "");
// ลบโค้ดบรรทัดเดียว
text = text.replace(/`([^`]+)`/g, "$1");
// ลบลิงก์ Markdown [text](url) ให้เหลือ text
services:
gitea-db:
image: postgres:17
container_name: Gitea-DB
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "gitea", "-U", "giteauser"]
timeout: 45s
interval: 10s
version: "3.8"
services:
ollama:
image: ollama/ollama
container_name: ollama
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"