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 July 8, 2026 06:44
Hello Vite+
$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!
@up1
up1 / 1.txt
Created July 7, 2026 09:43
PostgreSQL :: table !!
--- 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
@up1
up1 / gist:3a1a2f91522fff4c3325ac6aa697331b
Created July 6, 2026 14:37
Github Copilot Chat + Kimi K2.7 Code
Changelog for v1.0.68
2026-07-01
- Add support for the kimi-k2.7-code model
@up1
up1 / 2.txt
Last active July 4, 2026 03:05
ULimit BEAM
# 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
@up1
up1 / Hello.java
Last active July 3, 2026 06:52
Hello Java
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 + " ");
}
@up1
up1 / 1.txt
Last active July 3, 2026 07:00
Demo with Idempotency
func process1(a int, b int) int{
return a+b
}
$container --version
container CLI version 1.0.0 (build: release, commit: ee848e3)
$container system start
Launching container-apiserver...
Testing access to container-apiserver...
Verifying machine API server is running...
No default kernel configured.
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.28.0/kata-static-3.28.0-arm64.tar.zst]? [Y/n]: Y
Installing kernel...
@up1
up1 / 1.txt
Created July 1, 2026 06:03
Postgresql 19 beta 1
-- Create tables for customers, orders, customer_orders, and a property graph to represent the relationships between customers and their orders.
CREATE TABLE customers (
customer_id INT PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100)
);
CREATE TABLE orders (
order_id INT PRIMARY KEY,
customer_id INT,
@up1
up1 / 1.txt
Last active June 28, 2026 09:23
Demo with codebase-memory-mcp to visualize your code
# Install only in AI Agent
$curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/refs/heads/main/install.sh | bash
codebase-memory-mcp installer
os: darwin
arch: arm64
variant: standard
target: /Users/.local/bin/codebase-memory-mcp
# Install with UI mode
$curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/refs/heads/main/install.sh | bash -s -- --ui
@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