Skip to content

Instantly share code, notes, and snippets.

View ptb's full-sized avatar

Peter T Bosse II ptb

  • 18:13 (UTC -04:00)
View GitHub Profile
@ptb
ptb / ffmpeg-3.1.3-defaultstreams.patch
Last active September 19, 2016 01:16
Patch for FFMPEG to fix broken channel disabling behavior
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5208,26 +5208,46 @@ static void enable_tracks(AVFormatContext *s)
st->codecpar->codec_type >= AVMEDIA_TYPE_NB)
continue;
+ // note the first stream number for each type
if (first[st->codecpar->codec_type] < 0)
first[st->codecpar->codec_type] = i;
@ptb
ptb / macos-sierra-commands.sh
Created July 6, 2016 10:46 — forked from ProfFrnswrth/macos-sierra-commands.sh
Updating to macOS Sierra Developer Preview 1 directly from Apple
## based on https://github.com/lioonline/OS-X-El-Capitan
## pkg file link - http://osxapps.itunes.apple.com/apple-assets-us-std-000001/Purple30/v4/cc/62/24/cc62243b-7ed7-74cd-d47e-374bc470ecdf/diu414781394017735583.pkg
# !!IMPORTANT!! Run this from folder where you have downloaded or copied diu414781394017735583.pkg file
#create a tmp folder
mkdir sierraRoot && cd sierraRoot
#create a folder structure to match apple server
sudo mkdir -p ./apple-assets-us-std-000001/Purple30/v4/cc/62/24/cc62243b-7ed7-74cd-d47e-374bc470ecdf/
@ptb
ptb / pem2plex.py
Created June 10, 2016 21:22 — forked from lokulin/pem2plex.py
Convert the x509 certificate to certificate.p12 that Plex requires.
#!/usr/bin/python
import sys
import hashlib
from OpenSSL.crypto import *
def main():
if(len(sys.argv) != 4):
print sys.argv[0] + " /path/to/ssl.crt /path/to/ssl.key ProcessedMachineIdentifier"
sys.exit(0)