Skip to content

Instantly share code, notes, and snippets.

View nonkronk's full-sized avatar
:octocat:
g.dev/nonkronk

Irvan Tristian nonkronk

:octocat:
g.dev/nonkronk
View GitHub Profile
@nonkronk
nonkronk / update-cupsd-usb-bus.sh
Last active February 24, 2024 16:11
Script to auto-update USB path of printer for CUPSD container on UNRAID
#!/bin/bash
# define the name of cupsd container & printer
CONTAINER_NAME=cupsd
PRINTER_NAME='Seiko Epson Corp. L3110 Series'
# get bus and device number for Seiko Epson Corp. L3110 Series
bus_and_device=$(lsusb | grep -i "${PRINTER_NAME}" | awk '{print $2, $4}' | tr ':' ' ')
# extract bus and device numbers
@nonkronk
nonkronk / UpdateAddressList.rsc
Created April 13, 2023 05:38 — forked from tophrr/UpdateAddressList.rsc
MikroTik Address List Updater
## Generic IP address list input
## Based on a script written by Sam Norris, ChangeIP.com 2008
## Edited by ChrisG661, 2021
## Permissions: ftp, read, write, policy, test
# Check if file is not empty
:if ([/file get [/file find name=$filename] size] > 0) do={
# Remove existing addresses from the current address list
# Disabled as script will use same list for different sourcefiles
#/ip firewall address-list remove [/ip firewall address-list find list=$listname]
@nonkronk
nonkronk / ZoomHosts.rsc
Last active April 13, 2023 05:41 — forked from tophrr/ZoomHosts.rsc
MikroTik Zoom Hosts address list
## Made by ChrisG661, 2021
## github.com/ChrisG661
# Address list name
:local listname "zoom"
# Zoom IP range URLs
:local sourceUrl {"https://assets.zoom.us/docs/ipranges/Zoom.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomMeetings.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomCRC.txt"; \
"https://assets.zoom.us/docs/ipranges/ZoomPhone.txt"}
@nonkronk
nonkronk / vscode-tunnel-daemon-oracle-cloud.md
Last active January 8, 2025 14:40
Setup an Always-on VSCode Tunnel on Ubuntu Server

Setup an Always-on VSCode Tunnel on Oracle Cloud Always-free Instance

Access Oracle Cloud VM from any browser on any devices

Install VSCode for arm64

wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
@nonkronk
nonkronk / konami-efootball-server-ip-list.md
Last active January 22, 2025 18:26
List of KONAMI server (eFootball) IP addresses for white/blacklisting in Mudfish VPN

List of KONAMI server (eFootball) IP addresses for white/blacklisting in Mudfish VPN

Only relevant for Southeast users.

Whitelist

# Google Cloud - Jakarta
34.101.0.0/16
34.128.0.0/16
@nonkronk
nonkronk / deny-all-filter-rules-mikrotik.md
Last active March 4, 2025 15:39
Securing Mikrotik: default-deny-all filter rules for VLANs

Securing Mikrotik: default-deny-all filter rules + VLANs

Notes: Some IPs are already rotated to protect the innocent.

Give Admin access to trusted local devices

/ip firewall filter
add action=reject chain=forward comment="Block Telkom Router access" \
    dst-address=172.31.100.1 dst-port=80 protocol=tcp reject-with=\
@nonkronk
nonkronk / deploy-custom-vaultwarden-logo.md
Last active April 2, 2023 20:47
Deploy Vaultwarden with custom logo/icon

Deploy Vaultwarden with custom logo

Docker-compose:

version: "3.8"
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
@nonkronk
nonkronk / auto-resolve-wireguard-endpoints.md
Last active April 2, 2023 20:14
Auto-resolve all Wireguard endpoints (Dynamic DNS / IP address)

Auto-resolve all Wireguard endpoints (Dynamic DNS / IP address)

Add a systemd timer to run the script every 30 seconds:

sudo vi /etc/systemd/system/wg-autoresolve.timer
[Unit]
@nonkronk
nonkronk / unraid-essentials.md
Last active April 2, 2023 18:42
List of unRAID essentials

List of unRAID essentials

Directories

No Path Description Reference
1 /boot/config/plugins/dockerMan/templates Contains Docker templates where users can create their own custom Docker container templates that can be used with the Docker Manager.
2 /etc/libvirt/qemu/ Contains XML configuration files that are used to define the configuration of virtual machines
3 /usr/local/emhttp/plugins
/boot/config/plugins
Contains plugins that can be installed to extend the functionality of the system
4 /boot/config/ssh``/boot/config/ssh/root - Contains configurations used to enable and configure SSH access to the system- Contains SSH keys that can be used to access the system via SSH
@nonkronk
nonkronk / node-red-openwrt.md
Last active March 31, 2023 23:46
Install & autostart Node-RED on OpenWRT

Install & Auto-start Node-RED on OpenWrt

Install Node

opkg update
opkg install node-npm

Install Node-RED & pm2