Skip to content

Instantly share code, notes, and snippets.

@stefan736
stefan736 / startzeit_template.jinja
Last active December 30, 2025 12:05
HomeAssistant Template für Sensor Ermittlung günstigste E-Auto Ladezeit
{% set charging_duration = states('sensor.mokka_automatisch_laden_dauer_berechnet') | float %}
{% set prices = state_attr('sensor.tibber_prices', 'tomorrow') %}
{% set ns = namespace(
cheapest_index = 0,
cheapest_costs = 999999,
charging_window_costs = 0
) %}
@stefan736
stefan736 / update_mastodon.sh
Created September 25, 2025 18:09
update_mastodon.sh
#!/bin/bash
set -e
currentDir=$(pwd)
version=$1
echo "Updating Mastodon to $version..."
docker pull ghcr.io/mastodon/mastodon:$version
@stefan736
stefan736 / gist:87a4a1d4f35b387f9901c20aa181fa29
Last active February 9, 2022 13:48
Auto Update Linux Machine
#!/bin/bash
#
# Auto Updating Debian (means also Ubuntu) based Linux installations
#
# add to crontab ($ crontab -e)
# @reboot /home/username/update.sh >> /home/username/update.sh.log 2>&1
# 30 1 * * * /home/username/update.sh >> /home/username/update.sh.log 2>&1
#
# recognize wether we are currently inside an update process