My personal
Awesome
Docker ideas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '3.9' | |
services: | |
apps: | |
image: riskiwah/kustomize-poc:base | |
haproxy1: | |
image: haproxytech/haproxy-debian:2.0.28 | |
ports: | |
- "8080:80" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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*". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: error-demo-cronjob | |
spec: | |
schedule: "*/5 * * * *" | |
successfulJobsHistoryLimit: 2 | |
failedJobsHistoryLimit: 1 | |
jobTemplate: | |
spec: |