Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -ex
gst-launch-1.0 \
v4l2src device=$HDMI2USB !\
image/jpeg,width=1280,height=720 !\
jpegdec !\
videoconvert !\
videorate !\
video/x-raw,format=I420,width=1280,height=720,framerate=30/1,pixel-aspect-ratio=1/1 !\
queue !\
#!/usr/bin/env python3
import sys, gi, signal, pyinotify
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject, GLib
# init GObject & Co. before importing local classes
GObject.threads_init()
Gst.init([])
@MaZderMind
MaZderMind / mjpeg-test-source.cgi
Created April 1, 2016 17:16
enable your cgi-bin directory and place in /usr/lib/cgi-bin/
#!/bin/sh
echo 'Content-Type: multipart/x-mixed-replace;boundary=3cd47a181ec2129228c1e8784cd97e7a2473a5de';
echo 'Cache-Control: no-cache';
echo 'Cache-Control: private';
echo ''
gst-launch-1.0 videotestsrc !\
video/x-raw,width=1920,height=1080,framerate=25/1 !\
jpegenc !\
queue !\
avr-g++ -c -mmcu=atmega1280 -I. -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -finline-limit=3 -fno-inline-small-functions -fno-tree-scev-cprop -fno-split-wide-types -fno-jump-tables -gstabs -DF_CPU=16000000 -Os -Wall -pedantic -std=c++11
---
WS2812 *WS2812::setLed(uint16_t index, uint8_t r, uint8_t g, uint8_t b) {
uint16_t pointer = WS2812_FRAMEBUFFER_SIZE(index);
m_frameBuffer[pointer+0] = r;
m_frameBuffer[pointer+1] = g;
m_frameBuffer[pointer+2] = b;
[
{
"conference": "32C3",
"slug": "32c3",
"author": "CCC",
"description": "Live-Streaming vom 32C3",
"keywords": "32C3, Hacking, Chaos Computer Club, Video, Music, Podcast, Media, Streaming, Hacker, Hamburg",
"startsAt": "2015-12-27T05:00:00+0000",
"endsAt": "2015-12-30T20:00:00+0000",
"groups": [
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index c4b30b4926..7bbce7b1a5 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -111,6 +111,7 @@ typedef struct {
struct rect gauge; ///< rectangle for the gauge on the right
AVFrame *outpicref; ///< output picture reference, updated regularly
int meter; ///< select a EBU mode between +9 and +18
+ int reference; ///< reference level in LUFS
int scale_range; ///< the range of LU values according to the meter
@MaZderMind
MaZderMind / commit.bash
Last active May 23, 2017 10:00 — forked from dedeibel/commit.fish
fish function that prepares a git commit command with message containing the jira ticket number
# commit with juira-ticket-id shortcut
#
# install via `cat commit.bash >> ~/.bashrc`
# Use:
# Assuming you are in a git repository of a bitbucket / jira branch using the atlassian jira git flow conventions
# example "feature/EXP-1337-cool-new-feature
#
# > commit -a
# will call
# > git commit -em "EXP-1337: " -a
@MaZderMind
MaZderMind / gist:f03298fa38f456c8ca6f32f269f5d12d
Last active May 4, 2017 13:28
Was hab ich eigentlich heute getan (git)
~/C/foobar $ git config --global alias.today "log --pretty=format:'%ad - %s' --date=format:'%H:%M:%S' --author-date-order --reverse --all --since=7:00 --author=`whoami`"
~/C/foobar $ git today
11:39:51 - FOOBAR-137: Gestaltung des Backend-Editors
11:52:50 - FOOBAR-137: Anzeigenamen-Suffix konfigurierbar machen
11:59:10 - FOOBAR-42: ermögliche das Abbrechen des Anlegen eines Dingsbums
@MaZderMind
MaZderMind / LambdaMatcher.java
Created July 3, 2017 10:00 — forked from GuiSim/LambdaMatcher.java
Hamcrest matcher that matches a Lambda.
package util.matcher;
import java.util.function.Function;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
public class LambdaMatcher<T> extends BaseMatcher<T> {
private final Function<T, Boolean> matcher;
private final String description;
@MaZderMind
MaZderMind / cluster-forward.mazdermind.de.conf
Created July 16, 2017 14:19
Apache Configuration forwarding all unknown Requests to the Kubernetes-Cluster's Ingress
<VirtualHost *:80>
ServerAdmin peter@mazdermind.de
ServerName cluster-forward.mazdermind.de
# ServerAlias *
ProxyPass / "http://127.0.0.1:32080/" retry=0
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}