Skip to content

Instantly share code, notes, and snippets.

View RubenKelevra's full-sized avatar

@RubenKelevra RubenKelevra

View GitHub Profile
@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 July 16, 2024 09:53
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 September 19, 2024 14:37
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
@RubenKelevra
RubenKelevra / grocyAddMessurements.php
Created February 10, 2022 17:43 — forked from catatonicChimp/grocyAddMessurements.php
Add messurements to grocy
<?php
$apiaccess =[
"url" => "https://grocy.yourdomain.tld/api",
"key" => ""
];
$quantity_units = [
"Cup US" => [
"name" => "Cup US",
"description" => "",
"name_plural" => "Cups US"