Skip to content

Instantly share code, notes, and snippets.

View samzong's full-sized avatar
🌴
On vacation

samzong samzong

🌴
On vacation
View GitHub Profile
@samzong
samzong / prometheus_demo.py
Last active December 3, 2025 02:42
prometheus_demo
#!/usr/bin/env python3
"""Prometheus Demo - All 4 metric types: Counter, Gauge, Histogram, Summary"""
# before >>> pip install prometheus-client>=0.19.0
# document >>> https://opentelemetry-python.readthedocs.io/en/latest/api/metrics.html
import time
import random
from prometheus_client import Counter, Gauge, Histogram, Summary, start_http_server
@samzong
samzong / init_n8n.sh
Last active September 4, 2024 15:14
auto input n8n workflow backup and activate all workflows
#!/usr/bin/env bash
# Set strict mode
set -euo pipefail
IFS=$'\n\t'
# Script version
VERSION="1.3.0"
# Default values