Skip to content

Instantly share code, notes, and snippets.

View robbeofficial's full-sized avatar
💬
Typing

Robert Walter robbeofficial

💬
Typing
View GitHub Profile
@robbeofficial
robbeofficial / pubgen.py
Last active August 29, 2015 14:26
Generates publication lists from JSON data and mustache templates
import json
import pystache
# read template
template = open('template.mustache','r').read()
# ignore line breaks and parse \n instead
template = ''.join(template.splitlines()).decode('string_escape')
# load publications JSON
@robbeofficial
robbeofficial / gist:ddc9e22fa38542286bfb
Last active August 29, 2015 14:16
low latency screencast using ffmepg/mplayer

server

avconv -f x11grab -r 25 -s 1920x1200 -i :0.0 -vcodec libx264 -tune zerolatency -f mpegts udp://127.0.0.1:1234

client

mplayer -benchmark udp://127.0.0.1:1234
import java.io.*;
DataInputStream dis;
void setup()
{
size(256, 256);
try {
dis = new DataInputStream(new FileInputStream("/home/robbe/tmp/howtodrawmushrooms.8s.raw")); // 192khz, 8 bit signed, stereo PCM