Skip to content

Instantly share code, notes, and snippets.

@htpc-helper
htpc-helper / TechnicolorModem.py
Created November 11, 2018 03:46
Home Assistant sensor plugin for Technicolor TG799vac modem
# Home Assistant sensor plugin for Technicolor TG799vac modem
# Modem has been modified with https://github.com/davidjb/technicolor-tg799vac-hacks
# May work with other similar modems
# Based on the work of Matt Johnston with https://github.com/mkj/tgiistat
# htpc-helper (c) 2018
# MIT license, see bottom of file
from datetime import timedelta
@htpc-helper
htpc-helper / convert.mkv.sh
Last active July 19, 2024 08:58
Bash script for converting mkv to mp4 without transcoding video
#!/bin/bash
# Configure inputs
INPUT_FOLDER='/media'
DELETE_ORIGINALS=false #set to true to delete original files
# Set $IFS variable to handle files whitespace in name
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
@htpc-helper
htpc-helper / iOSinstalledApps.py
Last active February 6, 2025 10:18
A Python script that when run using Pythonista for iOS prints and copies to the clipboard a list of apps installed on the device
from objc_util import ObjCClass
import clipboard
LSApplicationWorkspace = ObjCClass('LSApplicationWorkspace')
workspace = LSApplicationWorkspace.defaultWorkspace()
appInfo = workspace.allApplications()
appTxt = ''
for app in appInfo:
if str(app.applicationType()) == 'User':
if len(appTxt) != 0:
@htpc-helper
htpc-helper / tvhRecordings.py
Last active August 24, 2016 05:53
Class for obtaining list of upcoming, completed, and current recordings from TVHeadend web api
#!/usr/bin/python
import urllib2, json
class TVHeadend:
def __init__(self, host, port):
self.url = 'http://' + host + ':' + port
def GetRunning(self):
url = '/api/dvr/entry/grid_upcoming'