Skip to content

Instantly share code, notes, and snippets.

View introt's full-sized avatar

introt

View GitHub Profile
@introt
introt / sensor-light.yaml
Created March 9, 2024 14:57 — forked from Blackshome/sensor-light.yaml
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.3**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@introt
introt / resetpass.sh
Created October 15, 2023 14:07
Reset HomeAssistant Core password
# modified from https://www.home-assistant.io/docs/locked_out/
# with additional info from https://community.home-assistant.io/t/password-lost/66288/14
# inside the venv:
# list users
hass --script auth --config ~/.homeassistant list
USER=the first line of output
read PASS # new password
# set the new password
hass --script auth --config ~/.homeassistant change_password "$USER" "$PASS"
@introt
introt / gist:32a3a193d49b3ddf3b4da3ab83eaec31
Created October 15, 2023 13:55
Manually restore HomeAssistant Core backup
1. Extract the backup .tar file
2. Extract the homeassistant.tar within
3. mv data ~homeassistant/.homeassistant
@introt
introt / htmlimageinliner.py
Created December 24, 2022 07:54
Zim plugin to inline images in HTML files
# Copyright 2022 introt <introt@koti.fimnet.fi>
# based on windowtitleeditor.py and Zim Desktop Wiki code released under GPLv2
import base64
from pathlib import PurePath
from zim.formats.html import Dumper, html_encode
@introt
introt / coauthor.py
Last active December 4, 2022 22:20
"Co-authored-by" lines from usernames and issue/PR urls using GitHub REST API
#!/usr/bin/env python3
"""
coauthor.py - credit GitHub users easily
Supports both issue and pull request urls
in addition to GitHub usernames.
Use directly in vim: ":r ! coauthor.py introt" or ":r ! coauthor.py https://github.com/user/repo/pull/1"".
@introt
introt / timely_rename.py
Last active January 15, 2022 17:53
Add event summaries to ISO 8601 -like filenames from an ICS calendar
#!/usr/bin/env python3
"""
timely_rename.py
Prepend ISO 8601 -like filenames
with event summaries from an ICS calendar
(c) 2021 introt
License: Apache 2.0
@introt
introt / find_tagged_pages.py
Created September 28, 2021 18:39 — forked from muguu/find_tagged_pages.py
Plugin for ZimWiki >= V0.67 (formerly search_tagged_pages)
# -*- coding: utf-8 -*-
# Plugin for ZimWiki: Find tagged pages.
# Copyright 2018 Murat Güven <muratg@online.de>
# Copyright ZimWiki: 2009-2013 Jaap Karssenberg <jaap.karssenberg@gmail.com>
# V1.20
# Change Log
# V1.20 Update to support ZimWiki >067
@introt
introt / search_tagged_pages.py
Created September 28, 2021 18:39 — forked from muguu/search_tagged_pages.py
Plugin for ZimWiki >0.61 and < V0.66
# -*- coding: utf-8 -*-
# Plugin for ZimWiki: Search tagged pages.
# Copyright 2015 Murat Güven <muratg@online.de>
# Copyright ZimWiki: 2009-2013 Jaap Karssenberg <jaap.karssenberg@gmail.com>
# V1.15
# Change Log
# V1.15: If cursor is at empty line, don't go back to previous line / word and lookup a tag.
@introt
introt / tasklist.py
Created September 28, 2021 18:39 — forked from muguu/tasklist.py
Plugin for Zim Wiki >=V0.61 and < V0.66
# -*- coding: utf-8 -*-
# Copyright 2009-2017 Jaap Karssenberg <jaap.karssenberg@gmail.com>
# Copyright 2017 Murat Guven <muratg@online.de>
# This is a plugin for ZimWiki from Jaap Karssenberg <jaap.karssenberg@gmail.com>
#
#
# Additions to the original tasklist plugin by Murat Guven <muratg@online.de>
# V1.99 Taskcomment: Added option to add / remove date, added all styles for the comment string and the comment
@introt
introt / taskdate.py
Created September 28, 2021 18:39 — forked from muguu/taskdate.py
Plugin for ZimWiki V0.66 or greater
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 Murat Guven <muratg@online.de>
# This taskdate plugin provides a date for tasks in start / due date
# format for ZimWiki from Jaap Karssenberg
# V0.80 for Zim > 0.65
# Change Log
# V0.80: Added Calendar within expander. Mouse selection of start / due date within calendar