Skip to content

Instantly share code, notes, and snippets.

View QNimbus's full-sized avatar
🎯
Focusing

Bas QNimbus

🎯
Focusing
  • The Netherlands
View GitHub Profile
@QNimbus
QNimbus / code_outline_exporter.py
Last active December 18, 2023 19:19
Python scripts
#!/usr/bin/env -S python -W ignore
# code_outliner_exporter.py
# Standard library imports
import os
import ast
import argparse
from pathlib import Path
@QNimbus
QNimbus / network-client.sh
Last active November 25, 2023 09:56
Basic network performance testing
#!/bin/env bash
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Function to perform iperf test
run_iperf_test() {
if ! command_exists iperf3; then
@QNimbus
QNimbus / log2ram.md
Last active November 16, 2023 15:18
Linux

log2ram

To install log2ram, run the following commands:

sudo apt update
sudo apt install rsync # RSync is synchronizes files and directories from one location to another
mkdir log2ram
curl -LfSs https://github.com/azlux/log2ram/archive/master.tar.gz | tar -xz --strip-components=1 -C log2ram
sudo ./install.sh
@QNimbus
QNimbus / crontab.md
Last active November 18, 2023 14:07
Docker + Nginx reverse proxy + LetsEncrypt + Chisel

Cron entry

0 0 * * 0 docker compose -f /opt/docker/nginx/docker-compose-le.yaml up && docker exec nginx-service nginx -s reload
@QNimbus
QNimbus / .Windows deployment & provisioning
Last active March 20, 2025 20:49
Windows deployment & provisioning #windows
Office 365 config.xml
Windows Sandbox config.wsb
Windows-Installer.ps1
boxstarter-sandbox.ps1
boxstarter-win11.ps1
@QNimbus
QNimbus / .wslconfig
Last active July 30, 2023 14:39
WSL2 Config
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=4GB
# Sets the VM to use two virtual processors
processors=2
# Automatically mount Windows drive when the distribution is launched
@QNimbus
QNimbus / premake5.lua
Last active April 1, 2023 10:47
Premake boilerplate
-- premake5.lua
workspace "MyProject"
architecture "x64"
configurations { "Debug", "Release", "Dist" }
-- Variables
OutputDir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
@QNimbus
QNimbus / iptables.sh
Last active May 31, 2023 20:17
Basic iptables configuration
trustedIP="1.2.3.4/32"
cat <<- EOF > /etc/iptables/rules.v4
# Generated by iptables-save v1.8.7 on Wed Mar 29 14:37:32 2023
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT