Skip to content

Instantly share code, notes, and snippets.

View RubenKelevra's full-sized avatar

@RubenKelevra RubenKelevra

View GitHub Profile
@RubenKelevra
RubenKelevra / TCS34725_spectral_responsivity.csv
Created September 26, 2024 12:19
Spectral Responsivity of the TCS34725 Sensor according to it's data sheet
Wavelength Clear Red Blue Green
300.082 0.001366 -0.533472 0.001622 0.000595
303.059 0.001324 -0.512613 0.001458 0.000543
304.341 0.001306 -0.503656 0.001388 0.000521
345.435 0.001664 -0.226396 -0.000341 -0.000182
345.664 0.001689 -0.224927 -0.000337 -0.000186
350.948 0.003065 -0.191446 0.001366 -0.000272
351.987 0.005193 -0.18496 0.001444 -0.000289
357.556 0.006174 -0.15077 0.001382 -0.000378
361.138 0.009636 -0.129404 0.001399 -0.000434
@RubenKelevra
RubenKelevra / enable_ipv6_modemmanager.txt
Last active July 6, 2024 21:09
Howto enable ipv6 in ArchLinux on a Mobile Modem
mmcli -m 0
# shows "IP supported: ipv4, ipv6, ipv4v6" but "initial bearer ip type: ipv4"
mmcli -m 0 --3gpp-set-initial-eps-bearer-settings="ip-type=ipv4v6"
# modem will disconnect and reconnect
mmcli -m 0
@RubenKelevra
RubenKelevra / Cookie AutoDelete Expressions.json
Created June 27, 2024 17:44
My Whitelist for Cookie AutoDelete
@RubenKelevra
RubenKelevra / My BlockTube Channel Blacklist (Browser Add-On)
Last active September 21, 2024 16:30
Annoying, Misleading, Clickbait, Low Quality Content, Headline Focused News, Badly Researched Content, Uninteresting & Idiots
// Channel ID filters
// Blocked by context menu (Prof. Dr. Christian Rieck)
UCSExr_QUT6h-4sGW5hGjrCA
// Blocked by context menu (Dark Seas)
UC34KnQchv18OwZJ7WouJbqA
// Blocked by context menu (Vacuum Bot)
UCoa5E2Xonf7NIMFwykez8xw
@RubenKelevra
RubenKelevra / git partial push
Last active December 28, 2022 13:39
Github only accepts pushes up to 2 GB as they are bundled into a single pack - this allows for a partial push via `git partial-push origin branchname` after placing it into .gitconfig. Error message"remote: fatal: pack exceeds maximum allowed size (2.00 GiB) error: remote unpack failed: index-pack abnormal exit"
[alias]
partial-push = "!sh -c
'REMOTE=$0;BRANCH=$1;BATCH_SIZE=100;
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
range=$REMOTE/$BRANCH..HEAD;
else
range=HEAD;
fi;
n=$(git log --first-parent --format=format:x $range | wc -l);
echo "Have to push $n packages in range of $range";
on powersave and battery
real 0m11.109s
user 0m22.276s
sys 0m3.989s
real 0m10.972s
user 0m22.343s
sys 0m3.903s
@RubenKelevra
RubenKelevra / ambient_light.yaml
Last active January 30, 2023 02:29
ESPHome example for an ambient light sensor with some smoothing / throttleling but overall low delay
esphome:
name: $devicename
platform: ESP8266
board: d1_mini
substitutions:
devicename: ambient-light-sensor
friendly_name: "Ambient Light Sensor"
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active October 11, 2024 20:28
Make Firefox fast again
@RubenKelevra
RubenKelevra / Recommended MotionEye Settings
Last active December 30, 2022 22:37
Recommended MotionEye Settings (version 4.3.2 at the time of writing) capturing a large area with walking people with an ESP32-CAM (OV2640)
"""Calculate jerks in the recent history (sliding exponential average) from lateral acceleration data"""
from __future__ import annotations
import time
from collections import deque
from math import hypot
from numpy import ma, logspace