Skip to content

Instantly share code, notes, and snippets.

[
{
"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": [
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;
@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 !\
#!/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([])
#!/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 !\
@MaZderMind
MaZderMind / easing.py
Last active August 29, 2015 14:26 — forked from th0ma5w/easing.py
Easing Equations in Python (orig by Robert Penner)
# ported from http://www.gizma.com/easing/ to https://gist.github.com/th0ma5w/9883420
# added some from https://gist.github.com/cleure/e5ba94f94e828a3f5466
# added some from http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
import math
def easeLinear(t, b, c, d):
return c*t/d + b
def easeInQuad(t, b, c, d):
[
{
"conference": "32C3",
"group": "Lecture Rooms",
"rooms": [
{
"slug": "hall1",
"schedulename": "Hall 1",
"thumb": "https://streaming.media.ccc.de/32c3/../thumbs/s1.png",
"link": "https://streaming.media.ccc.de/32c3/hall1/",
@MaZderMind
MaZderMind / log-after
Created June 6, 2015 03:57
gstreamer interaudiosrc timestamps before and after the a/v-sync-patch
outgoing dumb gap ts 0:00:00.000000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.025000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.050000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.075000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.100000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.125000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.150000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.175000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.200000000 duration 0:00:00.025000000
outgoing dumb gap ts 0:00:00.225000000 duration 0:00:00.025000000
@MaZderMind
MaZderMind / gist:5ef15902e0a3e6b04d47
Created April 28, 2015 12:57
jQuery - Wait for multiple Ajax-Calls
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
var reqs = [];
@MaZderMind
MaZderMind / media_ccc_de.py
Created April 9, 2015 12:20
media_ccc_de livestreamer plugin
"""Plugin for media.ccc.de
Supports:
- http://media.ccc.de
- http://streaming.media.ccc.de (not yet implemented)
"""
import re
import requests
import json