Skip to content

Instantly share code, notes, and snippets.

@likecyber
likecyber / EmbyUpdateWithPatch.sh
Last active February 5, 2025 18:01
Script for Synology DSM's Emby Server to update and patch itself with free Emby Premiere.
#!/bin/bash
# The script must be executed as the root user, or it will fail.
# You must have "Container Manager" installed before running this script.
# Additionally, "Emby Server" must be running or the script will do nothing.
# Manually run the script once to apply free Emby Premiere patch.
# Make sure to update the ASSET_PREFIX and ASSET_SUFFIX based on your Synology model.
# Check your asset prefix and suffix from here: https://github.com/MediaBrowser/Emby.Releases/releases/latest
# CAUTION: Tested only on emby-server-synology72_4.8.10.0_x86_64.spk. Compatibility with other versions is no guarantee.
@koolvn
koolvn / WG UDP hack on AsusWRT-Merlin.md
Last active April 21, 2025 07:02
UDP Trash Hack for WireGuard on AsusWRT Merlin

UDP Trash Hack for WireGuard on AsusWRT Merlin

Подготовка

Проверяем, что включен пункт меню Enable JFFS custom scripts and configs

image

Установка

  • Кладём файл wgclient-start в /jffs/scripts/
  • Делаем скрипт запускаемым
@httpsx
httpsx / WireGuard DPI обход РКН - Windows.md
Last active April 17, 2025 06:39
WireGuard DPI обход РКН - Windows

Для обхода блокировки достаточно отправить 1 любой udp пакет, тем самым нарушим начальное определение протокола WireGuard
Способ с использованием Windows PowerShell. Без скачивания Nmap и подобного софта.

Шаг 0: Отключитесь от всех туннелей.

Шаг 1: Редактируем Клиент конфиг

Добавим в него "ListenPort", это позволит иметь статичный порт на котором будет работать WireGuard
Нажмите ПКМ на нужный "туннель" и выберите "Редактировать выбранный туннель..." Step1

После DNS добавляем новую строку

@scyto
scyto / docker-swarm-architecture.md
Last active April 17, 2025 19:52
My Docker Swarm Architecture

This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...

Installation Step-by-Step

Each major task has its own gist, this is to help with maitainability long term.

  1. Install Debian VM for each docker host
  2. install Docker
  3. Configure Docker Swarm
  4. Install Portainer
  5. Install KeepaliveD
  6. Using VirtioFS backed by CephFS for bind mounts (migrating from glsuterFS - WIP)
@franklinmoy3
franklinmoy3 / opkg_restore.sh
Last active January 2, 2025 06:42
OpenWRT restore installed packages
#!/bin/sh
# Assumes backup was made using sysupgrade -k -b <name>
# Paste package list into /etc/backup/installed_packages.txt
# Reinstalls packages (ignoring source descriptors "overlay" and "rom" using awk)
opkg update
cat /etc/backup/installed_packages.txt | awk 'gsub(/overlay|rom/, ""){print}' | xargs opkg install
# Clean up duplicate conffiles generated by OPKG
rm /etc/*/*-opkg
echo "Done. Any duplicate conffiles created by OPKG have been deleted"
@nitred
nitred / optimal_mtu.md
Last active April 17, 2025 06:34
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@JPRuskin
JPRuskin / README.md
Last active February 12, 2025 14:11
Remove old releases from a Nexus3-repository, originally from PhilSwiss/nexus-cleanup

Nexus Cleanup Logo

Nexus-Cleanup

Remove old releases from a Nexus3-repository

This Groovy-script will purge old versions (sorted by version-number) from a repository hosted on Nexus 3.x.

You can set the desired repository and a maximum amount of versions at the beginning of this script.

@zarv1k
zarv1k / fGoogleIpRange.script
Last active October 11, 2024 12:02
Mikrotik: google ip-range JSON to address-list
:global fGoogleIpRange
if (!any $fGoogleIpRange) do={ :global fGoogleIpRange do={
:local addressList $1
:local ipRangeUrl $2
:local exceptionsJsonUrl $3
# load JSON parser - https://github.com/Winand/mikrotik-json-parser
/system script run JParseFunctions
# read file into JSONIn
@superseb
superseb / rke2-commands.md
Last active April 18, 2025 07:28
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 12, 2025 07:27
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg