Skip to content

Instantly share code, notes, and snippets.

View fake666's full-sized avatar

Thomas "fake" Högemann fake666

View GitHub Profile
@fake666
fake666 / gist:34b41d5c01f3a5bdea09699c24031c12
Created April 25, 2023 11:44
proxmox backup server task log json to ical converter
"""
requirement: pip install ics
usage:
# proxmox-backup-manager task list --all --limit 1000 --output-format json | python3 ./taskcal.py - > hostname.ics
"""
import sys
import json
from ics import Calendar, Event
# Original file: Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
# plugin for stepcraft PH-40 3d printing head to pause at layer height
# the original script doesn't work because the axis name E is wrong and some comments
# break UCCNC parsing.
from ..Script import Script
from UM.Application import Application #To get the current printer's settings.
from UM.Logger import Logger
@fake666
fake666 / ledatroniclt3.py
Created January 6, 2019 18:17
LEDATRONIC LT3 Wifi HomeAssistant sensor component
"""
Support for getting temperature and state from LEDATronic LT3 Wifi devices.
configuration.yaml:
sensors:
- platform: ledatroniclt3
host: 192.168.178.222
"""
"""
A homeassistant switch component to enable or disable fritz! box call deflections / call forwarding
tr 064 needs to be enabled, and call deflections have to be pre-defined in the box's ui.
removing and adding calldeflections while homeassistant is running will break this ;-)
"""
import logging
import voluptuous as vol
@fake666
fake666 / irtrans.py
Last active June 19, 2022 14:37
a simple homeassistant component for using irtrans IR blasters. place in custom_components/switch/ - simple as i only need it to fire up my webos tv, i can then control it using the separate binding.
"""
Support for irtrans IP devices with irdb
See: http://www.irtrans.de/
a simple homeassistant component for using irtrans IR blasters. place in custom_components/switch/
simple as i only need it to fire up my webos tv, i can then control it using the separate component.
usage:
switch:
#include <mimetic/mimetic.h>
using namespace std;
using namespace mimetic;
string testMessage = "Content-Type: multipart/mixed;\r\n\
boundary=\"_1_\"\r\n\
\r\n\
--_1_\r\n\
Content-Type: text/plain\r\n\
from libmproxy.models import HTTPResponse
from netlib.http.headers import Headers
import cgi
import re
from gzip import GzipFile
import StringIO
import time
XML_OK_RESPONSE = '''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">