Skip to content

Instantly share code, notes, and snippets.

View Llorx's full-sized avatar

Jorge Fuentes Llorx

View GitHub Profile
@Llorx
Llorx / gist:90a775d1ad376c65120c2fda593eefb3
Created July 26, 2017 14:11 — forked from borismus/gist:1032746
Convert a base64 string into a binary Uint8 Array
var BASE64_MARKER = ';base64,';
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(var i = 0; i < rawLength; i++) {
/**
* Test V8 optimization against eval and new Function
* Run with: node --allow-natives-syntax evalFuncOpt.js
* More verbose with: node --trace_opt --trace_deopt --allow-natives-syntax evalFuncOpt.js
*
* More info at: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
*/
function adder(a, b) {
return new Function('a', 'b', 'return b%2 ? a + b : b%3 ? a - b : b%5 ? b / a : a * b')(a, b);
From c259a69c7e75f29d45fd0bbf47899d15e71e2e79 Mon Sep 17 00:00:00 2001
From: Llorx <dallorx@gmail.com>
Date: Sat, 6 Aug 2016 14:34:50 +0200
Subject: [PATCH] Bitrate on-the-fly PoC
---
ffmpeg.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c