Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
// MIT http://rem.mit-license.org | |
function trim(c) { | |
var ctx = c.getContext('2d'), | |
copy = document.createElement('canvas').getContext('2d'), | |
pixels = ctx.getImageData(0, 0, c.width, c.height), | |
l = pixels.data.length, | |
i, | |
bound = { | |
top: null, |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
# Installation | |
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
# Easy Peasy | |
ffmpeg -i video.mp4 video.webm |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
define(['jquery'], function($) { | |
'use strict'; | |
return function(urlArray) { | |
return $.when.apply($, urlArray.map(function(url) { | |
if(url) { | |
var $imgDeferred = new $.Deferred(); | |
setTimeout(function() { | |
var imageTag = new Image(); |
#!/usr/bin/env bash | |
#set -x # for debugging | |
SSH_HOST="[email protected]" | |
# using -f and -o exitOnForwardFailure is helpful, but if you are managing processes that restart and you want to keep | |
# the tunnel open even after a restart this can be difficult (e.g. nodemon with a remote mongo, mysql, elasticsearch, etc) | |
# | |
# instead you can open the tunnels and close them on script exit |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This assert.asyncThrows
custom assertion allows us to write tests against failing async code, usually as a result of a server error (4xx/5xx response).
test('If the index route errors, I see a message', async function(assert) {
server.create('post');
server.get('/posts/:id', { errors: ['The site is down'] }, 500); // force Mirage to error
await assert.asyncThrows(() => {
return visit('/posts/1');
}, 'GET /posts/1 returned a 500');
import React, { ReactNode } from "react"; | |
import { CSSTransition as ReactTransition } from "react-transition-group"; | |
interface TransitionProps { | |
in?: boolean; | |
timeout: number; | |
enter?: string; | |
enterFrom?: string; | |
enterTo?: string; | |
leave?: string; |