Skip to content

Instantly share code, notes, and snippets.

@saihtaM
saihtaM / hdhomerun-socat.service
Last active December 25, 2023 14:52
HDHomeRun (legacy) streaming over VPN/VLANs using socat for port forwarding.
# This helps clients communicate with HDHR works across all VLANs and more, run this on a server with access to the clients prefix (because we need to see the broadcast).
[Unit]
Description=HDHomeRun socat port forwarding service
After=network.target
[Service]
ExecStartPre=/bin/sleep 5
ExecStart=/bin/bash -c '/usr/bin/socat udp4-recvfrom:65001,broadcast,fork udp4-sendto:HDHOMERUN-IP-HERE:65001 & /usr/bin/socat tcp4-listen:65001,reuseaddr,fork tcp4:HDHOMERUN-IP-HERE:65001'
Restart=always
RestartSec=3
@saihtaM
saihtaM / dk-YouSee
Last active August 10, 2019 21:26
Predefined muxes for TVHeadend for the danish DVB-C provider YouSee . I scanned for hours, so you only need to scan for minutes :) PLEASE NOTE, remember to use network id 100, and do "Force Scan" multiple times if channels are missing.
# dk-YouSee by mths.io
# 2019-10-08
# wget https://gist.githubusercontent.com/saihtaM/e5390f010e628263676c/raw/dk-YouSee -O /usr/share/tvheadend/data/dvb-scan/dvb-c/dk-YouSee
[CHANNEL]
DELIVERY_SYSTEM = DVBC/ANNEX_A
FREQUENCY = 770000000
SYMBOL_RATE = 6875000
INNER_FEC = NONE
MODULATION = QAM/64
INVERSION = AUTO
@saihtaM
saihtaM / doorbell.lua
Last active August 29, 2015 14:15
My ESP8266 NodeMcu Lua scripts.. I'll just usually only use init.lua, but you can do whatever you want.
-- GET request on input, https://gist.github.com/saihtaM/35681a39385fbbd92974
-- I use this on my doorbell, but I have a little mic module that returns 3V on GPIO2 when a high sound is detected. That little mic module is hidden inside the doorbell.
-- This way, if the power is out. My doorbell stil works, and I don't have to think about killing my ESP8266 due to the voltage spikes that my doorbell is so happy to spit out (according to my multimeter).
pin = 4 -- 3 = GPIO0, 4 = GPIO2
firstrun = true
gpio.mode(pin,gpio.INPUT)
function pinsendrequest()
print("Sending request")

Keybase proof

I hereby claim:

  • I am saihtaM on github.
  • I am saihtam (https://keybase.io/saihtam) on keybase.
  • I have a public key whose fingerprint is 5362 FC8C B667 3EC8 8690 8B11 B81D 6582 AB19 F018

To claim this, I am signing this object:

@ECHO OFF
ECHO Reset Volume Mixer Settings...
NET STOP Audiosrv
NET STOP AudioEndpointBuilder
REG DELETE "HKCU\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /F
REG ADD "HKCU\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore"
@saihtaM
saihtaM / komogvind_nowait.user.js
Last active August 29, 2015 14:08
These are my public userscripts - Click on "Raw" to install. They have all been tested with Greasemonkey for Firefox https://addons.mozilla.org/us/firefox/addon/greasemonkey/ - If enabled, they will auto update when I fix things.
// ==UserScript==
// @name KomogVind.dk Remove non-vip game loading wait times.
// @namespace http://www.komogvind.dk
// @description Fjerner banner reklamen, og sørger for at spillet indlæser hurtigst muligt.
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/komogvind_nowait.user.js
// @icon https://i.imgur.com/6Pxv6j6.gif
// @include http://www.komogvind.dk/spil/play.php*
// @version 1.4
// ==/UserScript==
@saihtaM
saihtaM / spotify_link.mrc
Created June 29, 2014 17:45
Click on link with Spotify URI in your mIRC client. Uses DDE ( http://www.mirchelp.net/helpfile/dde.htm ) for talking directly with Spotify
@saihtaM
saihtaM / incoming.php
Created June 12, 2014 11:32
Quick PHP debugging when you want to know what an API or whatever sends to you. And some other stuff.
<?php
// Remember to delete the emails, if you are not planning on removing some of the arrays below.
$message = "Results HEADER:\n" . print_r( getallheaders(), true );
$message .= "Results SERVER:\n" . print_r( $_SERVER, true );
$message .= "Results GET:\n" . print_r( $_GET, true );
$message .= "Results POST:\n" . print_r( $_POST, true );
$message .= "Results COOKIEs:\n" . print_r( $_COOKIE, true );
$message .= "Results SESSION:\n" . print_r( $_SESSION, true );
$message .= "Results FILES:\n" . print_r( $_FILES, true );
mail("YOUR@MAIL.HERE","Incoming.php stuff",$message); // You should obviously not use a server that has a spam filter. As it will be bad if it reports your webserver as a spammer.
@saihtaM
saihtaM / Axel.sh
Last active December 11, 2021 00:51
FreeBSD Beep
/usr/local/bin/beep -p 659 46
/usr/local/bin/beep -p 784 34
/usr/local/bin/beep -p 659 23
/usr/local/bin/beep -p 659 11
/usr/local/bin/beep -p 880 23
/usr/local/bin/beep -p 659 23
/usr/local/bin/beep -p 587 23
/usr/local/bin/beep -p 659 46
/usr/local/bin/beep -p 988 34
/usr/local/bin/beep -p 659 23
@saihtaM
saihtaM / epicrepeat.pl
Created March 6, 2014 23:50
Irssi script: Epic repeat!!
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "Mathias F. Svendsen",
contact => "#Mathias @ irc.QuakeNet.org",
name => "Epic repeat!!",
description => "A quick command, to repeat commands!",
license => "GPL",
url => "http://okey.dk/"