This file contains hidden or 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. SonicSerializer implements echo.JSONSerializer using bytedance/sonic | |
| type SonicSerializer struct{} | |
| // Serialize converts a Go object into a JSON byte slice and writes it to the context | |
| func (s SonicSerializer) Serialize(c echo.Context, i interface{}, indent string) error { | |
| enc := sonic.ConfigDefault.NewEncoder(c.Response()) | |
| if indent != "" { | |
| enc.SetIndent("", indent) | |
| } | |
| return enc.Encode(i) |
This file contains hidden or 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. ติดตั้ง JBang | |
| $curl -Ls https://sh.jbang.dev | bash -s - app setup | |
| $bang --version | |
| // 2. Start MCP Server | |
| $jbang quarkus-agent-mcp@quarkusio --port 8080 --project-dir ./demo-app | |
| // 3. ตัวอย่างการเพิ่ม MCP เข้าไปใน Claude Code | |
| $claude mcp add quarkus-agent -- jbang quarkus-agent-mcp@quarkusio |
This file contains hidden or 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
| import { test, expect } from '@playwright/test'; | |
| test('example test', async ({ page }) => { | |
| await page.goto('https://playwright.dev'); | |
| await expect(page).toHaveScreenshot(); | |
| }); |
This file contains hidden or 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. Create table | |
| CREATE TABLE orders_partitioned ( | |
| id BIGSERIAL NOT NULL, | |
| customer_id BIGINT NOT NULL, | |
| customer_name VARCHAR(255) NOT NULL, | |
| status order_status NOT NULL DEFAULT 'new', | |
| total_amount NUMERIC(12, 2) NOT NULL DEFAULT 0, | |
| created_at TIMESTAMPTZ NOT NULL DEFAULT now(), | |
| -- Partition key (created_at) must be part of the primary key | |
| PRIMARY KEY (id, created_at) |
This file contains hidden or 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
| QUERY /search HTTP/1.1 | |
| Host: ://demo.com | |
| Content-Type: application/json | |
| { | |
| "status": "completed", | |
| "date_range": { "start": "2026-01-01", "end": "2026-07-31" }, | |
| "sort": "DESC | |
| } |
This file contains hidden or 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
| $curl -fsSL https://vite.plus | bash | |
| Setting up VITE+... | |
| Would you like Vite+ to manage your Node.js versions? | |
| It adds `node`, `npm`, `npx`, and `corepack` shims to ~/.vite-plus/bin/ and automatically uses the right version. | |
| Opt out anytime with `vp env off`. | |
| Press Enter to accept (Y/n):Y | |
| ✔ VITE+ successfully installed! |
This file contains hidden or 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. View CacheMemoryContext --- | |
| SELECT pg_size_pretty(total_bytes) | |
| FROM pg_get_backend_memory_contexts() | |
| WHERE name = 'CacheMemoryContext'; | |
| ผลการทำงาน | |
| 1024 kB | |
| --- 2. Select from all tables in database | |
| DO |
This file contains hidden or 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
| Changelog for v1.0.68 | |
| 2026-07-01 | |
| - Add support for the kimi-k2.7-code model |
This file contains hidden or 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. Check in OS limit | |
| ulimit -n | |
| # 2. Check on system (ulimit -n cannot exceed) | |
| cat /proc/sys/fs/file-max | |
| # 3. check in BEAM | |
| :erlang.system_info(:port_limit) # the +Q ceiling | |
| :erlang.system_info(:port_count) # current usage |
This file contains hidden or 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
| import static java.lang.IO.print; | |
| import static java.lang.IO.println; | |
| void main() { | |
| int[] arr = {1, 2, 3, 4, 5}; | |
| // For each | |
| for (int i : arr) { | |
| print(i + " "); | |
| } |
NewerOlder