Skip to content

Instantly share code, notes, and snippets.

View jnbek's full-sized avatar

John D Jones III jnbek

View GitHub Profile
@jnbek
jnbek / 0.2-BETA FFMPEG_Concat-DateTime-Logo-Music.ps
Last active April 27, 2022 15:15
Some ffmpeg things I may need
#Unfortunately, this isn't perfect yet, it prints the date/time in real time, while the timelapse proceeds at 5x, need to figure this part out.
#See: https://superuser.com/questions/1013753/how-can-i-overlay-the-captured-timestamp-onto-a-video-using-ffmpeg-in-yyyy-mm-dd
ffmpeg -f concat -safe 0 -i .\mylist.txt -i aliengeek.gif -i cagar.mp3 -filter_complex drawtext="fontfile=Pacifico.ttf: text='%{localtime\:%c}':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=44:fontcolor=white",select='not(mod(n\,5))',setpts=N/FRAME_RATE/TB,fps=60,"overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01)" -vcodec libx264 -map 0:v:0 -map 2:a:0 -c:a aac -b:a 192k -shortest timelapse_all.mp4

Installation

MacOS

Get FFMPEG with all the options which is a little more complicated in brew because the Homebrew team removed all options from the core formula:

brew update
brew uninstall --force --ignore-dependencies ffmpeg
brew install chromaprint amiaopensource/amiaos/decklinksdk
brew tap homebrew-ffmpeg/ffmpeg
brew upgrade homebrew-ffmpeg/ffmpeg/ffmpeg $(brew options homebrew-ffmpeg/ffmpeg/ffmpeg | grep -vE '\s' | grep -- '--with-' | grep -vi chromaprint | tr '\n' ' ')
@jnbek
jnbek / docker_cmd.tst
Last active April 5, 2017 23:57
My note for creating a working docker
[root@jude3 ~]# cat text_files/create_a_working_docker_containter_that_gets_Talked_to.txt
docker create -p 3000:3000 -t -i --name TestDeb debian bash
@jnbek
jnbek / install_install_scripts.sh
Last active October 8, 2015 21:24
Fetch FreeBSD install/make scripts
#!/bin/sh
[ -d "$HOME/bin" ] || /bin/mkdir -v $HOME/bin;
cd $HOME/bin;
for i in makeworld makekernel installkernel installworld portupgrade upsrc upports;
do
echo "Fetching $i: ";
/usr/bin/fetch --no-verify-hostname --no-verify-peer https://raw.githubusercontent.com/jnbek/freebsd-local/master/RELENG_10/scripts/$i;
/bin/chmod -v 755 $i;
done;
@jnbek
jnbek / emperor.ini
Last active January 16, 2016 18:51
uwsgi vs freebsd
[uwsgi]
emperor = /usr/local/etc/uwsgi/vassals
uid = www
gid = www
@jnbek
jnbek / ping_api.rc
Last active December 22, 2016 03:10 — forked from dynax60/ping_api.rc
Example of FreeBSD rc-file for Mojolicious Hypnotoad Server
#!/bin/sh
# PROVIDE: ping_api
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
name="ping_api"
rcvar=`set_rcvar`
@tylerneylon
tylerneylon / json.lua
Last active April 19, 2024 21:02
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
ss23@Crisp /etc/init.d $ cat vixie-cron
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/vixie-cron/files/vixie-cron.rc7,v 1.1 2011/12/31 14:58:21 idl0r Exp $
command=/usr/sbin/cron
pidfile=/var/run/cron.pid
depend() {
@jnbek
jnbek / Mediawiki::API.pm
Created August 22, 2012 22:36
A Hard to Find Mediawiki API module written in Perl. I do not remember where I found this, but I can't find it anywhere else now.
# Mediawiki::API
# A Perl library to access the Mediawiki API
#
# TODO: Go through and wrap (probably) all of the 'die's in a check for dieOnError
package Mediawiki::API;
use strict;
use Data::Dumper;
use LWP::UserAgent;
@jnbek
jnbek / 2-516
Last active January 13, 2017 01:31
Upgrade Perl 5.16 FreeBSD
env DISABLE_CONFLICTS=1 portupgrade -cv -o lang/perl5.16 -f perl-5.12.\*
portupgrade -fr perl