Skip to content

Instantly share code, notes, and snippets.

View KrzysztofHajdamowicz's full-sized avatar

Krzysztof Hajdamowicz KrzysztofHajdamowicz

  • Wroclaw, Poland
  • 08:31 (UTC +01:00)
View GitHub Profile
@KrzysztofHajdamowicz
KrzysztofHajdamowicz / bcachefs_hit_ratio.py
Last active February 4, 2025 11:05
Bcachefs cache hit ratio
#!/usr/bin/env python3
import os
import glob
import sys
# Base directory for the bcachefs instance.
BASE_DIR = '/sys/fs/bcachefs/' + sys.argv[1]
def format_bytes(num_bytes):
"""
@KrzysztofHajdamowicz
KrzysztofHajdamowicz / Home Assistant + ESPHome + wmbusmeters.md
Last active December 29, 2024 16:41
Home Assistant + ESPHome + wmbusmeters
# binary sensor:
- platform: template
sensors:
people_at_home:
value_template: >-
{{ is_state('group.household', 'home')
or is_state('group.family', 'home') }}
should_i_ventilate_home:
friendly_name: "Czy wietrzyć w domu?"
value_template: >-