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 / 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 July 28, 2023 07:35
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!!")
@riskiwah
riskiwah / user_expired.yml
Created October 5, 2022 15:41
simple ansible playbook check user expired
---
- name: ansible user expired test
hosts: localhost
connection: local
become: yes
gather_facts: no
tasks:
- name: check user expire
shell: |
for user in $(cat /etc/passwd | cut -d: -f1)
[Unit]
Description=Files Cleaner
[Service]
Type=oneshot
ExecStart=/bin/echo "lets clean!"
# Dry run
ExecStart=/usr/bin/find /home/tarjow/ -type f -mtime +6 -exec echo rm {} \;
@riskiwah
riskiwah / ns-inet.sh
Created August 11, 2022 16:42 — forked from dpino/ns-inet.sh
Setup a network namespace with Internet access
#!/usr/bin/env bash
# set -x
if [[ $EUID -ne 0 ]]; then
echo "You must be root to run this script"
exit 1
fi
# Returns all available interfaces, except "lo" and "veth*".