This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var evts = [], | |
touchEvt, | |
mouseEvt, | |
msEvent; | |
if (evt === 'up') { | |
touchEvt = 'touchend'; | |
mouseEvt = 'mouseup'; | |
msEvent = 'MSPointerUp'; | |
} else if (evt === 'move') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
httpProxy = require('http-proxy'), | |
publicPort = 8000, | |
handlebarPort = 8080, | |
apiPort = 8888 | |
httpProxy.createServer(function (req, res, proxy) { | |
if (req.url.match(/\.json$/)) { | |
proxy.proxyRequest(req, res, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handlebars.registerHelper('eq', function(val, val2, block) { | |
if(val == val2){ | |
return block(this); | |
} | |
}); | |
//Usage in template | |
//{{#eq type "all" }} | |
//<button class="orderer" data-target="sortableAnswers_{{type}}">save order</button> | |
//{{/eq}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loveit = function(){ | |
var e,el,interval=Math.random()*60000; | |
e = new jQuery.Event("click"); | |
e.pageX=1; | |
e.pageY=1; | |
el = jQuery('.record_pile:last').nextAll('a').eq(2); | |
turntable.lastMotionTime=new Date().getTime(); | |
el.hover().trigger(e); | |
setTimeout(loveit, interval); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery Deparam - v0.1.0 - 6/14/2011 | |
// http://benalman.com/ | |
// Copyright (c) 2011 Ben Alman; Licensed MIT, GPL | |
(function($) { | |
// Creating an internal undef value is safer than using undefined, in case it | |
// was ever overwritten. | |
var undef; | |
// A handy reference. | |
var decode = decodeURIComponent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Bezier(a, b, c, d) { | |
this.a = a; | |
this.b = b; | |
this.c = c; | |
this.d = d; | |
this.len = 100; | |
this.arcLengths = new Array(this.len + 1); | |
this.arcLengths[0] = 0; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var image2canvas = (function ( global, document, undefined ) | |
{ | |
// parseUri 1.2.2 | |
// (c) Steven Levithan <stevenlevithan.com> | |
// MIT License | |
function parseUri (str) | |
{ | |
var o = parseUri.options, | |
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), | |
uri = {}, |
NewerOlder