Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix Niklas mrflix

View GitHub Profile
@mrflix
mrflix / gist:1010898
Created Jun 6, 2011
Lion Mail 3d Animation
View gist:1010898
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Lion Mail 3d Animation</title>
<style type="text/css">
body {
font: 12px/15px "Helvetica Neue", sans-serif;
background: #adb0b8;
}
@mrflix
mrflix / soundfinder.js
Created Sep 12, 2013
Soundfinder Bookmarklet
View soundfinder.js
// MIT License
// by @mrflix
(function(){
// Template Matching algorithm using correlation coeffizient
// http://en.wikipedia.org/wiki/Template_matching
// learned at HTW Berlin tought by Prof. Dr. Kai Uwe Barthel
function getCorrelationCoeffizient(data1, data2){
var sumI = 0, sumI2 = 0, sumIR = 0, sumR = 0, sumR2 = 0;
@mrflix
mrflix / OrbitControls.js
Last active Nov 29, 2021
Three.OrbitControls for multiple instances on a page.Usage: controls = new THREE.OrbitControls(camera, document, renderer.domElement); Based on: http://threejs.org/examples/js/controls/OrbitControls.js
View OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
* @author mrflix / http://felixniklas.de
*
* released under MIT License (MIT)
*/
@mrflix
mrflix / index.html
Last active Oct 19, 2015
svgstore fallback
View index.html
<!-- svgstore fallback -->
<script>
/*
detect if browser is
- Chrome 14-20
- Android Browser 4.1+
- iOS 6-7
- Safari 6
- Edge 12
- IE 9-11
@mrflix
mrflix / mediancut.js
Last active May 17, 2021
A implementation of the median cut algorithm to cluster the colors in an image.
View mediancut.js
// data = ctx.getImageData(0, 0, image.width, image.height).data;
//
// mediancut(data, colorCount);
// returns [[255,55,255], [233,34,233], [144,34,233], [89,34,233]];
function mediancut(data, n){
var boxes = [getBoundingBox(data)];
if(n !== 1){
boxes = cut(boxes[0]);
while(boxes.length < n){
View keybase.md

Keybase proof

I hereby claim:

  • I am mrflix on github.
  • I am mrflix (https://keybase.io/mrflix) on keybase.
  • I have a public key ASCOpDO8sXbOIcME41zIbTU7qlEV_iMQInJH53Z0OxRwVQo

To claim this, I am signing this object: