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 / 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 / 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 / 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 / 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 / Windows Sandbox.wsb
Last active January 19, 2025 10:56
Provisioning Windows Sandbox #windows
<Configuration>
<vGPU>Enable</vGPU>
<Networking>Default</Networking>
<AudioInput>Disable</AudioInput>
<VideoInput>Disable</VideoInput>
<PrinterRedirection>Disable</PrinterRedirection>
<ClipboardRedirection>Default</ClipboardRedirection>
<ProtectedClient>Enable</ProtectedClient>
<MappedFolders>
<MappedFolder>
@QNimbus
QNimbus / git-cheatsheet.md
Last active December 8, 2024 03:19
Cheat sheets #git #jq #cheatsheet
@QNimbus
QNimbus / gh-clean.sh
Last active July 11, 2024 12:26
Git scripts & tools #git #scripts
#!/bin/bash
#
# name: gh-clean.sh
# version: 1.2.0
# date: 2024-07-11
# author: B. van Wetten
# url: https://gist.githubusercontent.com/QNimbus/bbaf20553b9d733c2b3f1b95346dbe0f/raw/gh-clean.sh
# usage: Cleans a specified GitHub repository by removing the entire commit history of each branch, then recommitting each branch with the message 'Initial Commit'.
# Optionally, it can also clean the local repository to match the cleaned remote repository and clear all pull requests and PR branches.
#
@QNimbus
QNimbus / _index.md
Last active November 23, 2024 10:47
SSL Certificates #ssl
alias: Test
description: Test
triggers:
- id: key_single_click
trigger: event
event_type: zwave_js_value_notification
event_data:
domain: zwave_js
node_id: 172
command_class: 43
@QNimbus
QNimbus / .bash_aliases
Last active November 19, 2024 10:25
Linux WSL #linux #wsl
sgpt_function() {
if [ -t 0 ]; then
# Interactive mode
docker run --rm -it --name sgpt --user $(id -u):$(id -g) \
-e SHELL_NAME=$SHELL -e HOME=/home/$(whoami) -e TERM=xterm-256color \
-v gpt-cache:/tmp/chat_cache -v $(pwd):/app/workdir \
-v ~/:/home/$(whoami) shell-gpt "$@"
else
# Non-interactive mode