Skip to content

Instantly share code, notes, and snippets.

View egg82's full-sized avatar

egg82

View GitHub Profile
@egg82
egg82 / telegraf-qnap.conf
Created October 2, 2020 03:56
QNAP Telegraf config
[[inputs.snmp]]
agents = [ "10.0.0.5:161"]
interval = "45s"
timeout = "10s"
retries = 3
max_repetitions = 10
version = 2
community = "616a1b353f21d9495ffe536656f110299a27712a63fd4ae"
name = "snmp.NAS"
@egg82
egg82 / coredns_client.md
Last active December 9, 2024 15:19
CoreDNS on clients

Notes

This guide was designed for a fresh install of Ubuntu desktop 20.04

Edit the file /etc/sysctl.conf and add (or edit) the following line:

net.core.rmem_max=8388608

Reload sysctl

@egg82
egg82 / ubuntu_ad.md
Last active December 11, 2020 23:00
Ubuntu + AD

Yet another quick write-up, on Ubuntu 18.04 + Windows Server 2016 Active Directory

This guide allows you to hook up AD with an Ubuntu server for UNIX authentication using AD users.

It was difficult finding a guide that wasn't outdated or used some obscure software to get working, so this is that guide.

Filesystems/Hardware

All servers start from fresh, clean installs of Ubuntu 18.04.3 and Windows Server 2016

@egg82
egg82 / zsh-plugins.md
Last active December 31, 2019 20:56
ZSH plugins
TERM="xterm-256color"
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_DISABLE_PROMPT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=false
ZSH_THEME="powerlevel9k/powerlevel9k"

...

plugins=(
@egg82
egg82 / seaweedfs_owncloud.md
Last active March 20, 2025 06:26
SeaweedFS + OwnCloud

A quick write-up on SeaweedFS + OwnCloud

This guide aims to take a look at a distributed, scalable SeaweedFS as a backend storage for an OwnCloud server. Why not NextCloud? Because NextCloud's S3 connector is outdated and not maintained, and won't work with SeaweedFS. Both OwnCloud and NextCloud have the same support and the same plugins. The only concern anyone has is some weird split that happened between the two years ago. It's fine.

This was a giant pain in the ass, but eventually I got it working. This is how.

Filesystem/Hardware

All servers start from fresh, clean installs of Ubuntu 18.04.3

This guide will use three seperate boxes (one master/OwnCloud and two slaves). I'm assuming there's spare, unformatted disks attached to the slaves. If not, ignore or change the section on mounting to fit your needs.

import re
import os
import bz2
import lzma
import zstandard as zstd
import json
import sys
import html
import shutil
@egg82
egg82 / list.md
Last active February 19, 2026 16:48
Bukkit server guide & plugin list
#!/bin/bash
rm -f BuildTools.jar
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
build() {
version=$1
mkdir -p $version
mkdir -p Build-$version
cd Build-$version
#!/bin/bash
NOTIFYEMAIL="you@gmail.com"
check_ip() {
s=0
for i in {1..20}
do
r=$( hping3 -c 1 -S -p $2 $1 |& grep "packet loss" | cut -d " " -f 7 | rev | cut -c 2- | rev )
s=$((s+$r))
@egg82
egg82 / kernel_upgrade.sh
Created December 19, 2016 18:19
Apply New Kernel Debs (Cron-able)
#!/bin/bash
cd /mnt/build-bucket/grsec-kernel/
last=`ls -t linux-headers-*.deb | xargs -L 1 basename | sed -n 1p`
version=`echo $last | cut -d - -f 3`
currentversion=`uname -r | cut -d - -f 1`
pkg=`echo "linux-*"$version"*.deb"`
if [ $version == $currentversion ]; then