Skip to content

Instantly share code, notes, and snippets.

@mvadu
mvadu / grafana custom.ini
Last active January 19, 2025 13:38
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@jovimon
jovimon / gist:524e116471f249626fd2ccd141f3fe05
Last active July 15, 2024 08:23
compile realtek network driver for pfsense 2.4.x

How to compile and install latest realtek network driver in pfSense 2.4.x (FreeBSD 11.1)

  1. Download FreeBSD 11.1 VMDK and create a VM with it as HDD.

  2. Get FreeBSD source tree for your exact FreeBSD version and uncompress it to /usr/src:

    fetch -o /tmp ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r | cut -d'-' -f1,2`/src.txz
    tar -C / -xvf /tmp/src.txz
    
  3. Download latest Realtek network driver (you need to input an email address).

@MetalArend
MetalArend / swarm.yml
Last active November 18, 2024 01:43
Run a GitLab Runner on your Swarm
version: '3.4'
secrets:
# Find your registration token at: "Your project" > "Settings" > "CI/CD" > "Runners settings" > "Specific Runners" (look for registration token)
# Register it as `GITLAB_REGISTRATION_TOKEN`: `docker secret create GITLAB_REGISTRATION_TOKEN YOUR_REGISTRATION_TOKEN`
GITLAB_REGISTRATION_TOKEN:
external: true
# Find your personal access token at: "Your user account" > "Settings" > "Access Tokens" > "Create personal access token" (for api)
# Register it as `GITLAB_PERSONAL_ACCESS_TOKEN`: `docker secret create GITLAB_PERSONAL_ACCESS_TOKEN <YOUR ACCESS TOKEN>`
@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

@superseb
superseb / rke2-commands.md
Last active April 24, 2025 16:39
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
@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
@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.

@nitred
nitred / optimal_mtu.md
Last active April 28, 2025 00:42
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
@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"
@scyto
scyto / docker-swarm-architecture.md
Last active April 25, 2025 21:04
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)