Skip to content

Instantly share code, notes, and snippets.

{
title: {
text: '',
font: {
family: 'ORF ON Condensed',
size: 22,
weight: 700
},
},
xaxis: {
class HlsWrapper {
constructor({element, url, startTime, context}) {
this.hls = new Hls({
debug: false,
autoStartLoad: false
});
const analyticsConfig = getAnalyticsConfig(context);
if (analyticsConfig) {
this.analytics = new HlsAdapter({
debug: false,
@oberhamsi
oberhamsi / fpv-encode.sh
Last active April 28, 2019 11:16
hls encoder for no-audio analog-source video low resolution
#!/bin/bash
# https://ffmpeg.org/ffmpeg-formats.html#Options-5
AVIN="$1"
OUTNAME="$2"
mkdir $OUTNAME
ffmpeg -i $AVIN \
-an \
-c:v libx264 -profile:v main -level 4.1 -pix_fmt yuv420p \
#!/usr/bin/python
# source: http://mapnik-users.berlios.narkive.com/pN0x8SPC/animation-examples#post3
from mapnik import *
import math, sys, os
if __name__ == "__main__":
try:
mapfile = os.environ['MAPNIK_MAP_FILE']
except KeyError:
function recurseIframes(doc, iframes) {
let newIframes = doc.querySelectorAll('iframe');
if (newIframes.length > 0) {
iframes.push.apply(iframes, newIframes);
newIframes.forEach(iframe => {
recurseIframes(iframe, iframes);
})
}
return iframes;
}
const subprocess = require('ringo/subprocess');
const fs = require('fs');
const system = require('system');
const twitter = require('twitter-api');
// your twitter credentials here
const twitterConfig = {
token: '',
tokenSecret: '',
$icon-color: #8297BD;
$hover-icon-color: #B5CEFF;
$progress-bar-color: #8297BD;
$controls-background: rgba(0,0,0,0.7);
$text-color: white;
.oonmedia-video .oonmedia-controls {
background-color: $controls-background;
> * {
// erklärung 3d: http://blackpawn.com/texts/pointinpoly/
// code unten kopiert von: http://stackoverflow.com/a/2049593
// auf welcher seite der gerade bc ist punkt a?
// http://stackoverflow.com/questions/22668659/calculate-on-which-side-of-a-line-a-point-is
// cross product 2d: http://allenchou.net/2013/07/cross-product-of-2d-vectors/
function sign(a, b, c) {
return (a[0] - c[0]) * (b[1] - c[1])
- (b[0] - c[0]) * (a[1] - c[1]);
}
-- Module instantiation
local cjson = require "cjson"
local cjson2 = cjson.new()
local cjson_safe = require "cjson.safe"
-- Initialize the pseudo random number generator
-- Resource: http://lua-users.org/wiki/MathLibraryTutorial
math.randomseed(os.time())
math.random(); math.random(); math.random()
(function(videojs) {
var oontvthek = function(options) {
var player = this;
function initMenu() {
var MenuItem = videojs.getComponent('MenuItem');
var ResolutionMenuItem = videojs.extend(MenuItem, {
constructor: function(player, options){
options.selectable = true;
// Sets this.player_, this.options_ and initializes the component