Skip to content

Instantly share code, notes, and snippets.

@shadowandy
shadowandy / docker default address pool.md
Created September 13, 2025 09:10
Setting default address pool for Docker containers' network

New docker container networks often take quite a sizable address pool /8 or 255.0.0.0.

New networks takes addresses like 172.18.0.0/8 and 172.19.0.0/8 which are often excessive for home use.

The default address pool can be changed via the daemon configuration file for Linux Docker.

To configure it, create or edit the configuration file at /etc/docker/daemon.json

@shadowandy
shadowandy / Reboot Unifi Devices Bash Script.md
Last active September 13, 2025 06:14
Bash Script to reboot Unifi Devices

Creating the APIKEY to interact with your Unifi Controller

  1. Using a web browser, go to your Unifi Controller web portal
  2. Navigate to Control Plane > Integration
  3. Create a new APIKEY and note it down APIKEY_VALUE

Preparing the details

Ensure you have the:

  • Unifi Controller Address (CONTROLLER_IP_ADDRESS)
@shadowandy
shadowandy / netplay-relay-server-container.md
Last active August 11, 2025 06:23
Container for netplay relay server

Dockerfile and compose.yaml

netplay_folder
 |
 +-- Dockerfile
 |
 +-- compose.yaml
@shadowandy
shadowandy / PlexServer_Docker-on-Ubuntu_-on-Beelink-S12-Pro.md
Last active September 13, 2025 09:11
Setting up Plex Server (Docker on Ubuntu) on Beelink S12 Pro
@shadowandy
shadowandy / 00-button
Created October 26, 2015 02:34 — forked from jefferyto/00-button
Switching network configurations on a TP-Link TL-MR3020 with OpenWrt (12.09 Attitude Adjustment) using the sliding switch. Based on the sample scripts at: https://forum.openwrt.org/viewtopic.php?pid=172111#p172111 and https://forum.openwrt.org/viewtopic.php?pid=172110#p172110
# based on
# https://dev.openwrt.org/browser/trunk/target/linux/atheros/base-files/etc/hotplug.d/button/00-button
# https://forum.openwrt.org/viewtopic.php?pid=172110#p172110
. /lib/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
do_button () {
local button
@shadowandy
shadowandy / platform.txt
Last active February 9, 2023 10:20
Using esptool for Arduino IDE
Just open platform.txt located at
/Users/$USER/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/platform.txt
and move to the end of file. Then you will see this line.
tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" -ca 0x00000 -cf "{build.path}/{build.project_name}.bin"
Change it like this way