Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>remote control</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--
serve on the same machine that remotecontrol_firefox-netflix.sh runs on
-->
<style type="text/css">
@uahim
uahim / bg_start.c
Created December 11, 2020 17:44
as bg_start.exe is completely gone from the interwebs - maybe someone could fix the limitation? (no spaces in paths)
/*
* This program will start executables and batch script in the background.
* Written by Rouslan Placella, rouslan [at] placella [dot] com, 10-Oct-2009.
*/
/*
* This file is part of bg_start.
*
* bg_start is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@uahim
uahim / uptime.c
Last active March 23, 2022 18:56
a little formatting change
// Uptime.c
// William Riley
// 4/99
// Returns the amount of time since windows was started
//
// Changes in line 11f and 43-50
#include <stdio.h>
#include <time.h>
#include <windows.h>
s#:ue:#ü#g
s#:oe:#ö#g
s#:ae:#ä#g
s#:Ue:#Ü#g
s#:Oe:#Ö#g
s#:Ae:#Ä#g
s#ß#ß#g
@uahim
uahim / arte.user.js
Last active April 23, 2025 15:23
get stream url - 0.1.8.2 updated April 2025, dirty but working fix; now with concert support
// ==UserScript==
// @name arte stream url
// @namespace http://tampermonkey.net/
// @version 0.1.8.2
// @description get arte m3u8 stream url
// @author You
// @match https://www.arte.tv/de/videos/*
// @match https://www.arte.tv/fr/videos/*
// ==/UserScript==
@uahim
uahim / arte_v2.sh
Last active May 19, 2024 14:41
May 2024: this will no longer work as arte stopped serving http mp4 hosting; script stays up for reference
#!/bin/bash
# usage
# arte_v2.sh <url>
# now also displays the link to high quality direct download of the mp4 and supports arte concert
# important:
# requires jq, which is "like sed for JSON data" ( https://stedolan.github.io/jq/ )
# replace with your preferred user agent
@uahim
uahim / servustv_2022_bookmarklets.js
Last active December 17, 2022 14:15
shows the stream url to watch in VLC or to feed into ffmpeg, youtube-dl or its various forks; fix to match non-fictional content
// stream url to watch in VLC or to feed into ffmpeg, youtube-dl or its various forks
// displayed line-by-line for better readability
javascript:
var id = location.href.split("/");
var urlp = "https://dms.redbull.tv/v5/destination/stv/";
var urls = "/personal_computer/chrome/de/de_DE/playlist.m3u8";
var properid = id[id.length - 2].toUpperCase();
if (properid.match(/^AA/) != null) {
var filmtitle = document.querySelector('meta[property="og:title"]').content;
@uahim
uahim / yt2cue.sh
Created June 14, 2022 18:19
converts YouTube 00:00 Track 1 format to tracklist and .cue files
#!/bin/bash
# usage:
# yt2cue.sh source_file "artist" "album title"
# set to 1 to debug :=)
debug=0
i="0"
> yt2cue.cue
@uahim
uahim / imdb_soundtrack_2023.user.js
Last active January 21, 2023 20:12
fixes imdb 2023 redesign soundtrack page bullshit
// ==UserScript==
// @name imdb soundtrack
// @namespace imdb
// @description fixes imdb 2023 redesign soundtrack page bullshit
// @include https://www.imdb.com/title/tt*/soundtrack*
// @version 0.6
// @grant none
// ==/UserScript==
var repx = new RegExp("(Produced|Performed|Written|Music|Lyrics|Courtesy) (by|of|and).*", "gi");
var artistname = "Brass Against";
var output = "";
function fancyTimeFormat(duration) {
// Hours, minutes and seconds
const hrs = ~~(duration / 3600);
const mins = ~~((duration % 3600) / 60);
const secs = ~~duration % 60;
// Output like "1:01" or "4:03:59" or "123:03:59"