Skip to content

Instantly share code, notes, and snippets.

@Lu5ck
Lu5ck / cmd_holo_place.lua
Created June 11, 2025 20:56
Beyond all Reason widget - Make builder move to next command if current build task is assisted by nano
-- Original by manshanko, modified by timuela to add more options
-- Lu5ck optimized the codes and changed from "force nano to assist" to "start next queue when nano assist"
function widget:GetInfo()
return {
name = "Holo Place",
desc = "Start next queue if any when assisted by nano",
author = "manshanko, timuela, Lu5ck",
date = "2026-06-12",
layer = 2,
@Lu5ck
Lu5ck / map_nuttyb_raptor_grid_draw.lua
Last active June 2, 2025 15:50
Beyond all Reason widget for Raptor on Full Metal Plate 1.7 map
function widget:GetInfo()
return {
name = "Raptor Grid Draw 12 players (Full Metal Plate 1.7)",
desc = "Draws fairly distributed build border for 12 players raptor mode on Full Metal Plate 1.7 map",
author = "Lu5ck",
date = "31 May 2025",
layer = 1,
enabled = true
}
end
@Lu5ck
Lu5ck / pbr.user.geoip
Last active April 26, 2025 16:59
OpenWRT PBR by GeoIP
#!/bin/sh
# shellcheck disable=SC2015,SC3003,SC3060
# See https://www.iwik.org/ipcountry/ for list
GEO_PREFIX="SG"
GEO_URL="https://www.iwik.org/ipcountry"
TARGET_TABLE="inet fw4"
TARGET_INTERFACE="wan"
GEO_IPv4="/var/tmp/pbr_geo_ipv4.txt"
@Lu5ck
Lu5ck / pbr.user.asn
Created April 25, 2025 16:10
OpenWRT PBR by AS number
#!/bin/sh
# shellcheck disable=SC2015,SC3003,SC3060
# ASN example
# Replace "ASN_" with a unique word to minimize conflicts with other asn based scripts
ASN_URL="https://stat.ripe.net/data/announced-prefixes/data.json?resource=AS138341"
ASN_JSON_FILE="/var/tmp/pbr_asn_ip_ranges.gz"
TARGET_TABLE="inet fw4"
TARGET_INTERFACE="wan"
@Lu5ck
Lu5ck / pbr.user.fastly
Last active April 24, 2025 08:33
OpenWRT PBR Fastly
#!/bin/sh
# shellcheck disable=SC2015,SC3003,SC3060
FASTLY_URL="https://api.fastly.com/public-ip-list"
FASTLY_JSON_FILE="/var/tmp/pbr_fastly_ip_ranges.gz"
TARGET_TABLE="inet fw4"
TARGET_INTERFACE="wan"
cleanup()
{
rm -f "$FASTLY_JSON_FILE"
@Lu5ck
Lu5ck / pbr.user.aws
Last active April 24, 2025 08:35
OpenWRT PBR AWS by Regions
#!/bin/sh
# shellcheck disable=SC2015,SC3003,SC3060
AWS_URL="https://ip-ranges.amazonaws.com/ip-ranges.json"
AWS_JSON_FILE="/var/tmp/pbr_aws_ip_ranges.gz"
AWS_REGIONS="ap-southeast-3 ap-southeast-5 ap-southeast-1 GLOBAL"
TARGET_TABLE="inet fw4"
TARGET_INTERFACE="wan"
AWS_IPv4="/var/tmp/pbr_aws_ipv4.txt"
AWS_IPv6="/var/tmp/pbr_aws_ipv6.txt"
@Lu5ck
Lu5ck / pbr.user.azure
Last active April 24, 2025 08:36
OpenWRT PBR Azure by Regions
#!/bin/sh
# shellcheck disable=SC2015,SC3003,SC3060
AZURE_URL="https://www.microsoft.com/en-us/download/details.aspx?id=56519"
AZURE_JSON_FILE="/var/tmp/pbr_azure_ip_ranges.gz"
AZURE_REGIONS="southeastasia southindia"
AZURE_ADD_EMPTY_REGION="n"
TARGET_TABLE="inet fw4"
TARGET_INTERFACE="wan"
AZURE_IPv4="/var/tmp/pbr_azure_ipv4.txt"
@Lu5ck
Lu5ck / check_mem_leak.sh
Last active January 24, 2024 20:07
Palworld - Dedicated Linux Server Scripts
#Script to check for available memory
#If available memory is below certain amount, it will initiate shutdown
#The shutdown is done via rcon https://github.com/gorcon/rcon-cli
#You can get this script to be execute in crontab
#!/bin/bash
lock_file="/home/Palworld/Palworld/check_mem_leak.lock"
rcon_yaml="/home/Palworld/Palworld/rcon.yaml"
rcon="/home/Palworld/Palworld/rcon"