Skip to content

Instantly share code, notes, and snippets.

View jbuchbinder's full-sized avatar

Jeff Buchbinder jbuchbinder

View GitHub Profile
@jbuchbinder
jbuchbinder / mp42mkv.sh
Created May 23, 2021 22:07
Convert MP4 + SRT to MKV
#!/bin/bash
# mp42mkv
# @jbuchbinder
for v in *.mp4; do
s="${v//.mp4}.srt"
o="${v//.mp4}.mkv"
if [ -f "$s" ]; then
echo "Found $v and $s"
@jbuchbinder
jbuchbinder / ctdailyfire-phantom.js
Created March 23, 2021 19:47
PhantomJS script to produce an image of the CT daily forest fire danger rating
// phantomjs script for obtaining CT daily forest fire report
var p = require('webpage').create();
p.viewportSize = { width: 480, height: 265 };
p.clipRect = { top: 50, left: 0, width: 480, height: 215 };
p.open('https://www.depdata.ct.gov/forestry/forestfire/firerpt.cshtml', function() {
p.render('ff.png');
phantom.exit();
});
@jbuchbinder
jbuchbinder / winy-capture.sh
Created May 3, 2018 12:48
Streamripper audio stream capture for WINY 1350 AM, Putnam, CT
#!/bin/bash
# winy-capture.sh
streamripper "http://18783.live.streamtheworld.com/WINYAMAAC.aac?pname=StandardPlayerV4&pversion=4.19.0-003&tdsdk=js-2.9&banners=none&sbmid=fe526fc8-ee41-4b27-fb09-dbff4ac11f99" -A -t -a $(date +"%Y_%a_%b_%d_%H%M%P")
@jbuchbinder
jbuchbinder / mp3-to-mp4-with-still-image.sh
Created December 11, 2017 13:13
Convert mp3 audio with still image to mp4 video
ffmpeg -loop 1 -framerate 2 -i input.png -i audio.m4a -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mp4
@jbuchbinder
jbuchbinder / rosco-dvxc-merge.sh
Last active March 30, 2021 16:35
Rosco DVXC merging script
#!/bin/bash
# rosco-dvxc-merge.sh
# @jbuchbinder
#
# Merges together AVI output from Rosco DVXC Dual Vision cameras using ffmpeg and mencoder.
# Run from a directory containing the _front.avi and _rear.avi files from a series of exports.
NAME="$1"
QVAL=15
@jbuchbinder
jbuchbinder / nodeletes.js
Created September 22, 2016 16:41
Tungsten Replicator Javascript filter
/**
* VMware Continuent Tungsten Replicator
* Copyright (C) 2015 VMware, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@jbuchbinder
jbuchbinder / win7-winexe-enable.cmd
Created August 29, 2016 16:46
Enable winexe remote execution on windows 7
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
@jbuchbinder
jbuchbinder / Blackmagic Fusion FPM recipe.sh
Created July 28, 2016 18:23
Blackmagic Fusion 8.2+ Linux deb recipe
fpm -s dir \
-t deb \
-n blackmagic-fusion \
-v 8.2-b1 \
-d libedit2 \
/usr/lib/x86_64-linux-gnu/libedit.so.0=/usr/lib/x86_64-linux-gnu/libedit.so.0 \
/opt/Fusion=/opt/Fusion \
/usr/share/applications/Fusion.desktop=/usr/share/applications/Fusion.desktop
@jbuchbinder
jbuchbinder / fpm-openssl.sh
Created June 7, 2016 15:58
FPM OpenSSL build
#!/bin/bash
# fpm-openssl - @jbuchbinder
# Build script for recent openssl builds using FPM on EL7. Untar the release and run this script to build
# your RPM. Requires:
# - RPMS: ruby-devel make gcc rpm-build
# - GEMS: fpm
./config && make depend && make all && make install INSTALL_PREFIX=/tmp/openssl
fpm -s dir -t rpm -n openssl-recent \
@jbuchbinder
jbuchbinder / discovery-livestream.sh
Last active March 19, 2017 20:15
Download discovery TV public access content
#!/bin/bash
# discovery-livestream.sh - @jbuchbinder
#
# Download date-stamped content from Channel 22
STAMP=$( date +%Y%m%d-%H%M )
rtmpdump \
-v \
-r 'rtmp://discovervideo.mpl.miisolutions.net/DiscoverVideo-live-29/_definst_/' \