Skip to content

Instantly share code, notes, and snippets.

View up1's full-sized avatar

Somkiat Puisungnoen up1

View GitHub Profile
@up1
up1 / ArgoCD.md
Created September 2, 2025 15:30 — forked from bhimsur/ArgoCD.md
Installing ArgoCD on Minikube

Installing ArgoCD

  1. We will start with launching minikube cluster.
minikube start --driver=docker
  1. Create a namespace for argocd
kubectl create namespace argocd
  1. Apply ArgoCD manifest installation file from ArgoCD github repository
@up1
up1 / install.md
Last active September 2, 2025 15:02
ArgoCD in minikube

1. Start minikube

$minikube start

$minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
@up1
up1 / 1.txt
Last active September 2, 2025 04:45
Spring Boot 4 with OpenTelemetry starter
.m2/repository/io/opentelemetry/opentelemetry-sdk-trace/1.53.0/opentelemetry-sdk-trace-1.53.0.jar)
2025-09-02T11:41:27.145+07:00 INFO 91609 --- [demo_otel] [main] [ ] i.m.c.instrument.push.PushMeterRegistry :
Publishing metrics for OtlpMeterRegistry every 1m to http://localhost:4318/v1/metrics
with resource attributes {service.name=demo_otel}
@up1
up1 / 1.txt
Last active August 27, 2025 07:03
Go green tea
# Start with Green tea
$GOEXPERIMENT=greenteagc go run main.go
2025/08/27 11:01:27 pprof server on :6060
2025/08/27 11:01:27 Server running on :8080 with Green Tea GC enabled
/gc/heap/allocs:bytes = {1 2402052896 <nil>}
/gc/heap/frees:bytes = {1 2396205576 <nil>}
/gc/heap/allocs:objects = {1 22943712 <nil>}
/gc/heap/frees:objects = {1 22922079 <nil>}
/gc/heap/live:bytes = {1 5356376 <nil>}
@up1
up1 / Deleted fd cleanup.md
Created August 26, 2025 06:30 — forked from narate/Deleted fd cleanup.md
This script helps identify and optionally truncate files that have been deleted but are still held open by processes on a Linux system (commonly causing df to show full disk while du shows much less).

Script Explanation: deleted_fd_cleanup.sh

This script helps identify and optionally truncate files that have been deleted but are still held open by processes on a Linux system (commonly causing df to show full disk while du shows much less).


Features

  1. Detects all (deleted) files currently held open by processes using lsof.
  2. Ensures each PID+FD is handled only once to avoid duplicate operations.
@up1
up1 / 1.java
Last active August 18, 2025 15:15
Spring framework 7 and Spring Boot 4
@EnableResilientMethods
class Demo {
// 5 retry attempts and an exponential back-off strategy with a bit of jitter
@Retryable(maxAttempts = 5, delay = 100, jitter = 10, multiplier = 2, maxDelay = 1000)
public void sendNotification() {
this.jmsClient.destination("notifications").send(...);
}
//
@up1
up1 / 1.txt
Created August 15, 2025 02:34
Gemma 3 270M in Ollama
$ollama run gemma3:270m
pulling manifest
pulling 29005e200100: 22% ▕███████████ ▏ 52 MB/241 MB 6.1 MB/s 30s
@up1
up1 / 1.txt
Last active August 14, 2025 16:36
Java 25
# ทำการติดตั้งและ config Java 25 :: https://jdk.java.net/25/
$javac -version
javac 25
$java -version
openjdk version "25" 2025-09-16
OpenJDK Runtime Environment (build 25+35-3488)
OpenJDK 64-Bit Server VM (build 25+35-3488, mixed mode, sharing)
@up1
up1 / 1.txt
Last active August 14, 2025 04:55
Go 1.25.0
# Update go 1.25
$go env -w GOTOOLCHAIN=go1.25.0
$go version
go version go1.25.0 darwin/arm64
# เปิด Go doc
$go doc -http
doc: Documentation server listening on addr http://localhost:61699
@up1
up1 / 1.txt
Last active July 20, 2025 14:31
Shared memory with Cipher
// Install
$npm install -g @byterover/cipher
// Verify
$cipher --version
0.1.1
// Config API Key for OpenAI in file .env
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key