Skip to content

Instantly share code, notes, and snippets.

View stavarengo's full-sized avatar

Rafael Stavarengo stavarengo

View GitHub Profile
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active May 19, 2025 10:27
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 April 23, 2025 04:07
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