Skip to content

Instantly share code, notes, and snippets.

View Derkades's full-sized avatar

Robin Derkades

  • 07:59 (UTC +02:00)
View GitHub Profile
@nitred
nitred / optimal_mtu.md
Last active May 21, 2024 13:48
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
@p7cq
p7cq / vm1-start.sh
Last active January 19, 2024 14:27
Dynamic CPU isolation in QEMU/KVM
#!/usr/bin/env bash
#
# CPU isolation in QEMU/KVM
#
# As the cset scripts no longer work (systemd switched to cgroups v2), this is my
# attempt at emulating its functionality. It may be incorrect and/or it may break
# stuff. Blind copy-pasting with some reasoning follows.
#
# Host:
@cameronelliott
cameronelliott / turnutils_uclient.md
Last active January 15, 2024 13:31
Tutorial for turnutils_uclient and Coturn server

Tutorial for turnutils_uclient and Coturn server

@Zemoj
Zemoj / Readme.md
Last active June 14, 2019 13:07 — forked from ciotlosm/Readme.md
Kiosk mode for lovelace

Kiosk mode

Installation

Add kiosk.js file with the content below to your www folder in config.

Like any other custom script, use ui-lovelace.yaml resources section to reference the kiosk.js file.

Make sure you add kiosk somewhere in your URL. You can use it in the id of your view or in the query string.

@bxabi
bxabi / pulseaudio.service
Last active March 20, 2021 00:13 — forked from awidegreen/pulseaudio.service
systemd definition for pulseaudio in system-mode (example for archlinux).The pulseaudio developers explicitly recommend to NOT run pulseaudo system-mode!
# systemd service spec for pulseaudio running in system mode -- not recommended though!
# on arch, put it under /etc/systemd/system/pulseaudio.service
# start with: systemctl start pulseaudio.service
# enable on boot: systemctl enable pulseaudio.service
[Unit]
Description=Pulseaudio sound server
After=avahi-daemon.service network.target
[Service]
Type=forking
@ObserverOfTime
ObserverOfTime / css-inject.js
Last active March 3, 2024 04:46 — forked from 1j01/README.md
GitHub Desktop Dark Theme - NO LONGER MAINTAINED
/**
* To apply the theme:
* 1) Open dev tools with CTRL + SHIFT + I
* 2) Go to the console
* 3) Paste the following code
* Note: You will have to do this again whenever Github Desktop updates
*/
const fs = require('fs');
const path = require('path');
@BernCarney
BernCarney / FreeNAS11 Media Stack.md
Last active May 1, 2023 20:31
FreeNAS 11 - Jails setup for Plex, NGINX, PlexPy, Sonarr, Radarr, Jackett, Ombi, and Nzbget

FreeNAS 11 setup for Plex, PlexPy, Sonarr, Radarr, Jackett, NZBGet, Organizr, NGinx, and Ombi

I am currently working on updating this guide after updating my media server. I have added notes on things I no longer use but may update those sections in the future for users who still use them. As of now, I have everything working with the exception of Ombi and the plugins I no longer use.

@shnhrrsn
shnhrrsn / plexDatabaseBackupScript.sh
Last active January 5, 2022 13:46 — forked from ssmereka/plexDatabaseBackupScript.sh
Plex Media Server database backup script.
#!/usr/bin/env bash
# Backup a Plex database.
# Author Scott Smereka
# Version 1.0
# Modified by Shaun Harrison
# Version 1.1
# Script Tested on:
@sbstp
sbstp / minecraftd
Last active April 1, 2020 13:55
Wrapper script for the official minecraft server (or spigot) to shut it down gracefully via SIGTERM. Useful to put behind systemd and friends.
#!/usr/bin/env python3
from signal import signal, SIG_IGN, SIGTERM, SIGINT
import subprocess
import sys
USAGE = '''Usage: minecraftd [server jar path] [java options]*'''
JAVA_BIN = '/usr/bin/java'
JAVA_OPTS = ['-XX:+UseParNewGC', '-XX:+UseConcMarkSweepGC',
'-XX:+AggressiveOpts']
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 21, 2024 15:55
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings