Skip to content

Instantly share code, notes, and snippets.

@satori99
satori99 / piaservers.json
Created November 11, 2023 19:40
PIA VPN Servers
{
"groups": {
"ikev2": [
{
"name": "ikev2",
"ports": [
500,
4500
]
}
@satori99
satori99 / app.mjs
Last active June 22, 2021 10:34
castapp
#!/usr/bin/env node
import castv2 from 'castv2'
console.debug( 'app.js !!!' )
const address = process.argv[ 2 ]
const client = new castv2.Client()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
Date: Sat, 31 Oct 2020 13:40:00 +0100
Subject: [PATCH 1/1] Prefer -pthread over -s USE_PTHREADS=1
See https://github.com/emscripten-core/emscripten/issues/12346
Upstream-Status: Pending
diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py
FROM emscripten/emsdk:2.0.21
RUN apt-get update \
&& apt-get install -qqy \
build-essential \
prelink \
autoconf \
libtool \
texinfo \
pkgconf \
@satori99
satori99 / rpi_patch_for_mpeg2_vc1.sh
Created July 1, 2019 09:09
Patch Raspberry Pi boodcode to enable HW MPG2 enc/dec
#!/bin/bash
# https://www.reddit.com/r/raspberry_pi/comments/5x7xbo/patch_for_mpeg2_vc1_license/
function do_patch() {
if [ -f "/boot/${1}" ]; then
cp "/boot/${1}" "/boot/${1}_backup"
perl -pne 's/\x47\xE9362H\x'${2}'\x18/\x47\xE9362H\x'${2}'\x1F/g' < "/boot/${1}_backup" > "/boot/${1}"
echo "Patched /boot/${1}..."
fi
@satori99
satori99 / ssdp.js
Last active June 16, 2019 06:08
A simple SSDP server class which responds to M-SEARCH messages
/**
* @file ssdp.js
* @author satori99
*/
const debug = require( 'debug' )( 'SSDP' );
const EventEmitter = require( 'events' );
const dgram = require( 'dgram' );
const net = require( 'net' );
@satori99
satori99 / app.js
Last active April 17, 2024 09:36
This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy that can reduce the volume of ad-breaks
/**
* This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy
* that can reduce ad volume.
*
* It only works on streams containing SCTE35 data packets.
* You can check a stream using:
*
* ffmpeg -hide_banner -i <SOURCE_URL> 2>&1 | grep scte_35
*
* Start the demo:
@satori99
satori99 / pi3-dlna-setup.md
Last active March 21, 2018 08:14
Raspberry Pi 3 DLNA Server

Raspberry Pi 3 DLNA Server

These are my install notes to configure a Raspberry Pi with an External USB hard drive as super lightweight media server for smart TV's.

Create a Base Image

I have started off with Raspbian-lite Stretch

user@local: ~$ wget http://director.downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2018-03-14/2018-03-13-raspbian-stretch-lite.zip
@satori99
satori99 / fancontrol.sh
Last active March 20, 2018 13:36
Raspberry Pi Cooling Fan Control via GPIO
#!/bin/bash
#
# Raspberry Pi Fan Control Script
#
# This script toggles a GPIO output pin when a system temperature limit is exceed to control a cooling fan.
#
# usage:
#
# $ ./fancontrol.sh
#
@satori99
satori99 / hdmioff.service
Created March 18, 2018 23:46
Raspberry Pi - HDMI Off Service
# Raspberry Pi - HDMI Off Service
#
# This is a systemd one shot service to disable (power off) the HDMI port
# on a raspberry pi at boot to save a tiny amount of power (30mw)
#
# save this file as `/etc/systemd/system/hdmioff.service`, then run the
# following commands:
#
# $ sudo systemctl enable hdmioff.service
# $ sudo systemctl start hdmioff.service