Skip to content

Instantly share code, notes, and snippets.

View thornbill's full-sized avatar
💭
I may be slow to respond.

Bill Thornton thornbill

💭
I may be slow to respond.
View GitHub Profile
@thornbill
thornbill / post-process.sh
Last active February 24, 2024 22:16
DVR post processing script for Jellyfin
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
PWD="$(pwd)"
die () {
#EXTM3U
#EXTINF:0, tvg-logo="" group-title="Security Camera",Camera 1
rtsp://192.168.1.100/live0
#EXTINF:0, tvg-logo="" group-title="Security Camera",Camera 2
rtsp://192.168.1.101/live0
#EXTINF:0, tvg-logo="" group-title="Security Camera",Camera 3
rtsp://192.168.1.102/live0
@thornbill
thornbill / listing.mjs
Last active September 16, 2022 16:29
List all items and paths from a Jellyfin server
import { Jellyfin } from '@jellyfin/sdk';
import { getItemsApi } from '@jellyfin/sdk/lib/utils/api/items-api.js';
import { ItemFields } from '@jellyfin/sdk/lib/generated-client/models/item-fields.js';
const jellyfin = new Jellyfin({
clientInfo: {
name: 'Jellyfin Listing',
version: '1.0.0'
},
deviceInfo: {
@thornbill
thornbill / web-config.json
Created July 27, 2022 02:19
Sample Web Config 10.8
{
"includeCorsCredentials": false,
"multiserver": false,
"themes": [
{
"name": "Apple TV",
"id": "appletv",
"color": "#bcbcbc"
}, {
"name": "Blue Radiance",
@thornbill
thornbill / remove_rand_style.js
Created September 11, 2014 20:01
Remove a random rule from a random stylesheet
(function(document) {
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
var sheets = document.styleSheets,
sheet = sheets[getRandomInt(sheets.length-1)],
rules = sheet.cssRules,
rule = getRandomInt(rules.length-1);
@thornbill
thornbill / find_tables.js
Created November 12, 2014 17:33
Bookmarklet that highlights any table elements on a page
javascript:(function(d){function h(e){if(typeof e!=='object')return;function o(e){var _x=0,_y=0;while(e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop)){_x+=e.offsetLeft;_y+=e.offsetTop;e=e.offsetParent;}return {top:_y,left:_x};}var p=o(e);c(p.left,p.top,e.clientWidth,e.clientHeight);}function c(x,y,w,h){var e=d.createElement('div');e.style.zIndex='999999';e.style.background='rgba(255,0,0,0.6)';e.style.position='absolute';e.style.left=x+'px';e.style.top=y+'px';e.style.width=w+'px';e.style.height=h+'px';d.body.appendChild(e);}var t=d.getElementsByTagName('table'),i,l=t.length;for(i=0;i<l;i++){h(t[i]);console.log(t[i]);}})(document);
@thornbill
thornbill / .gitlab-ci.yml
Created November 22, 2016 21:29
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
@thornbill
thornbill / Caddyfile
Last active January 26, 2021 19:07
Caddyfile for Jellyfin
jellyfin.example.com {
basicauth username "password" {
# web interface
/web/
# sensitive api endpoints
/system/
/users/
# valid api prefixes
/jellyfin/
/emby/
@thornbill
thornbill / 10.7 Hit List.md
Last active November 30, 2020 02:41
10.7 Hit List
@thornbill
thornbill / inject_jquery.js
Created May 8, 2014 18:00
Bookmarklet to Inject jQuery
javascript:(function(d){var%20s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js';d.head.appendChild(s);})(document);