Skip to content

Instantly share code, notes, and snippets.

View riskiwah's full-sized avatar
🐻
Nothing to do

riskiwah

🐻
Nothing to do
View GitHub Profile
@riskiwah
riskiwah / init.vim
Created April 5, 2025 20:08
markdown focus
" Default Vim
colorscheme desert
set mouse=a
set encoding=utf-8
set fileencoding=utf-8
set ttyfast
set nocompatible
set backspace=indent,eol,start
set nocp digraph sc vb wmnu noeb noet nosol ai
set autoindent expandtab tabstop=2 shiftwidth=2
@riskiwah
riskiwah / alert.rules.yml
Created February 22, 2025 17:59 — forked from krisek/alert.rules.yml
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@riskiwah
riskiwah / README.md
Created August 30, 2024 16:54
steampipe kubernetes query

steampipe kubernetes query

kubernetes pod

--- cpu and memory per pod
> select
  p.namespace,
  p.name as pod_name,
  c ->> 'name' as container_name,
@riskiwah
riskiwah / README.md
Created June 27, 2024 17:33
[k3s] traefik cert manager selfsign

Traefik cert-manager selfsign redirect

Generate CA and ClusterIssuer

---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: selfsigned-cluster-issuer
  namespace: cert-manager
@riskiwah
riskiwah / cron-fail.yaml
Created December 28, 2023 18:35
quick cronjob kubernetes
apiVersion: batch/v1
kind: CronJob
metadata:
name: error-demo-cronjob
spec:
schedule: "*/5 * * * *"
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 1
jobTemplate:
spec:
@riskiwah
riskiwah / id-radio.m3u
Created June 20, 2023 15:54
indonesia local radio playlist
#EXTM3U
#EXTINF:-1, Kosmonita Malang
http://202.58.200.26:1055/live
#EXTINF:-1, Prambors Jakarta
https://23683.live.streamtheworld.com/PRAMBORS_FMAAC.aac
#EXTINF:-1, SS 100 Surabaya
https://c5.siar.us/proxy/ssfm/stream
@riskiwah
riskiwah / webpconvert.sh
Created May 11, 2023 19:34
webp convert
#!/bin/bash
for image in $PWD/**/*.{png,jpg,jpeg}; do
if [[ $image != *"webp"* ]]; then
cwebp -q 80 "$image" -o "${image%.*}.webp"
echo "Converted $image to ${image%.*}.webp"
rm "$image"
fi
done
@riskiwah
riskiwah / README.md
Last active December 20, 2024 16:45
Arch Linux - T14 Gen 3

Arch Linux - T14 Gen 3

Bios

  • Make sure to disable Secure boot
  • Make sure to disable TPM 2

Partition

| Device | Size | Type |

@riskiwah
riskiwah / docker-ideas.md
Created November 22, 2022 15:42
docker-ideas.md
@riskiwah
riskiwah / abc.py
Created November 22, 2022 15:05
DIY service up, suitable if combine with cron
import requests, subprocess
resp = requests.get("https://riskiwah.xyz")
if resp.status_code == 502:
print("Your Landing Pages is Down!!")
subprocess.call("docker-compose up -d", shell=True, cwd="/home/dietpi/code/wireguard-way/")
else:
print("Your Landing Pages is Up!!")