Skip to content

Instantly share code, notes, and snippets.

View RubenKelevra's full-sized avatar

@RubenKelevra RubenKelevra

View GitHub Profile
@RubenKelevra
RubenKelevra / My BlockTube Channel Blacklist (Browser Add-On)
Last active April 8, 2024 09:02
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 April 19, 2024 01:51
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"
alias: 'Bedroom auto turn on High Power Lights '
description: ''
trigger:
- platform: numeric_state
entity_id: switch.adaptive_lighting_bedroom
attribute: color_temp_kelvin
for: '00:05:00'
above: '5000'
- platform: state
entity_id: input_boolean.bedroom_lights_master_switch
@RubenKelevra
RubenKelevra / IPFS-convert-datastore-with-system-service-installation.md
Created May 4, 2020 18:50
IPFS convert datastore with system service installation

Compile the tool https://github.com/ipfs/ipfs-ds-convert via your user account

echo "$GOPATH" -> if empty go to ~/go/bin/, else "$GOPATH/bin/"

copy the ipfs-ds-convert binary to /tmp/:

cp -a ipfs-ds-convert /tmp/

convert your datastore: