This file contains 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
// Source: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js | |
// t: current time | |
// b: beginning value | |
// c: change in value | |
// d: duration | |
ease_in_cubic(t, b, c, d) { | |
return c*(t/=d)*t*t + b; | |
} |
This file contains 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
// Your server must have wp-cli installed (http://wp-cli.org/) | |
var async = require("async"); | |
var exec = require("child_process").exec; | |
var cores = 32; // Adjust the number of cores to match your environment | |
var total = 0; | |
var finished = 0; | |
var q = async.queue(function(task, callback) { |
This file contains 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
@easing: cubic-bezier(0.19, 1, 0.22, 1); | |
.modal { | |
opacity: 0; | |
transition: opacity 500ms @easing, visibility 0s linear 500ms; | |
&.visible { | |
visibility: visible; | |
opacity: 1; | |
transition: opacity 500ms @easing; | |
} |
This file contains 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 interval = setInterval(function() { | |
$.ajax({ | |
url: "https://api.wistia.com/v1/medias/" + HASHED_ID + ".json?api_password=" + WISTIA_API_TOKEN, | |
success: function(data) { | |
// Update the encoding progress bar | |
$(".progress .bar").css("width", Math.round(100 * data.progress) + "%"); | |
// Inject the video when ready | |
if (data.status == "ready") { | |
$("#container").append($("<div/>").addClass("wistia_embed wistia_async_" + HASHED_ID)); | |
clearInterval(interval); |
This file contains 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 exec = require("child_process").exec; | |
var fs = require("fs"); | |
exec("gm convert test.jpg -quality 95 new.jpg", function (error, stdout, stderr) { | |
exec("gm compare -highlight-style Assign -highlight-color red -file out.jpg test.jpg new.jpg", function (error, stdout, stderr) { | |
// Done. | |
}); | |
}); |