Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
import subprocess
from renderlib import *
from easing import *
def pauseFrames(params):
# 2 sec Fadein Text1
{
"nickname": "derchris",
"subtitle": "VOC",
"background": [255, 0, 0],
"fg_color": [255, 255, 255],
"fg_sub_color": [0, 255, 255],
"background_night": [128, 0, 0],
"fg_color_night": [255, 255, 255],
"fg_sub_color_night": [0, 0, 255]
}
<schedule>
<version>v6</version>
<conference>
<acronym>gpn18</acronym>
<title>18. Gulaschprogrammiernacht</title>
<start>2018-05-10</start>
<end>2018-05-13</end>
<days>4</days>
<timeslot_duration>00:05</timeslot_duration>
</conference>
@derchrisuk
derchrisuk / qt5ver.py
Created February 18, 2018 16:01
Qt5 version check
import inspect
from PyQt5 import Qt
vers = ['%s = %s' % (k,v) for k,v in vars(Qt).items() if k.lower().find('version') >= 0 and not inspect.isbuiltin(v)]
print('\n'.join(sorted(vers)))
#!/bin/bash
curl -s 'https://carsharing.mvg-mobil.de/json/stations.php' -H 'Host: carsharing.mvg-mobil.de' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:58.0) Gecko/20100101 Firefox/58.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.7,de;q=0.3' --compressed -H 'Referer: https://carsharing.mvg-mobil.de/' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'X-Requested-With: XMLHttpRequest' --data 'bounds=48.35034573083013%2C11.765499114990238%7C48.357218689277715%2C11.806697845458984&providerIds=1%7C2%7C3%7C5%7C11%7C12%7C14&zoom=17' | jq '.sta | length'
ffmpeg -i $video1 -i $video2 -i $video3 -i $video4 -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=960x540 [a0]; [1:v] setpts=PTS-STARTPTS, scale=960x540 [a1]; [2:v] setpts=PTS-STARTPTS, scale=960x540 [a2]; [3:v] setpts=PTS-STARTPTS, scale=960x540 [a3]; [base][a0] overlay=shortest=0 [tmp0]; [tmp0][a1] overlay=shortest=0:x=960:y=0 [tmp1]; [tmp1][a2] overlay=shortest=0:x=0:y=540 [tmp2]; [tmp2][a3] overlay=shortest=0:x=960:y=540" -f matroska pipe:1 | ffplay -
<?xml version='1.0' encoding='utf-8' ?>
<schedule>
<version>Mildenberg</version>
<conference>
<acronym>34c3</acronym>
<title>34th Chaos Communication Congress</title>
<start>2017-12-27</start>
<end>2017-12-31</end>
<days>4</days>
<timeslot_duration>00:15</timeslot_duration>
@derchrisuk
derchrisuk / gist:8269456d584843b556c33c84c4e3b923
Created November 20, 2017 11:58
ffmpeg for Facetime HD streaming
ffmpeg -y -f avfoundation -framerate 30 -s 1280x720 -i "FaceTime HD Camera:Built-in Microphone" -pixel_format uyvy422 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -x264opts "keyint=30:min-keyint=30:no-scenecut" -acodec libfdk_aac -profile:v high422 -g 30 -keyint_min 30 -vb 3M -bufsize 3M -maxrate 7M -acodec aac -f hls -hls_allow_cache 1 -hls_time 1 -hls_list_size 3 -hls_flags program_date_time -hls_playlist_type event -use_localtime 1 -f flv rtmp://127.0.0.1:1935/live
/* Functional prototype of a physical Voctomix button deck with a take button,
implemented on the Stream Deck -- pivot 2017-11-11 */
const path = require('path');
const streamDeck = require('elgato-stream-deck');
var net = require('net');
var source_ids = new Array('slides', 'cam1', 'cam2', 'cam3');
var mode_ids = new Array('fullscreen', 'picture_in_picture',
'side_by_side_select', 'side_by_side_equal');
const path = require('path');
const streamDeck = require('elgato-stream-deck');
var net = require('net');
var sleep = require('sleep');
var client = new net.Socket();
var SRC_A = 'cam1';
var SRC_B = 'cam2';
var a = 0;
var b = 0;