Skip to content

Instantly share code, notes, and snippets.

View stavarengo's full-sized avatar

Rafael Stavarengo stavarengo

View GitHub Profile
@Marsu31
Marsu31 / sync-qbittorrent-gluetun-port-forward.sh
Last active October 5, 2025 10:59 — forked from tyvsmith/sync-qbittorrent-gluetun-port-forward.sh
TrueCharts - Sync QBittorrent Gluetun Port Forwards
#!/bin/bash
# Run on a cron from the host.
NAMESPACE=ix-qbittorrent
CONTAINER_VPN=qbittorrent-vpn
CONTAINER_BITTORRENT=qbittorrent
# Fetch the name of the pod with the label "app.kubernetes.io/instance=qbittorrent"
POD=$(k3s kubectl -n $NAMESPACE get pod -l app.kubernetes.io/instance=qbittorrent -o jsonpath="{.items[0].metadata.name}")
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active November 29, 2025 14:10
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@bpanthi977
bpanthi977 / rclone-exclude.py
Last active May 14, 2025 20:41
Create rclone --exclude-from list by recursively visting .gitignore files
#!/usr/bin/env python
import os
import subprocess
def append_parentpath(path, ignore_string):
return [path + '/' + line for line in ignore_string.splitlines()]
def traverse_and_generate(path, printpath=""):
dirs = os.listdir(path)
if '.git' in dirs:
@paullewis
paullewis / requestIdleCallback.js
Last active November 23, 2025 03:15
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software