Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
<meta property="fb:app_id" content="406655189415060"> | |
<meta property="og:site_name" content="Giphy"> | |
<meta property="og:url" content="http://giphy.com/gifs/rhuber-test-djeEV9Xji6zjgLXBxug"> | |
<meta property="og:title" content="Animated GIF"> | |
<meta property="og:description" content="The best GIFs are on Giphy"> | |
<meta property="og:type" content="video.other"> | |
<meta property="og:image" content="http://media.giphy.com/media/djeEV9Xji6zjgLXBxug/giphy.gif"> | |
<meta property="og:image:width" content="912"> |
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
precision mediump float; | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; | |
void main() { | |
vec2 aspect = resolution.xy / min(resolution.x, resolution.y); | |
vec2 position = (gl_FragCoord.xy / resolution.xy) * aspect; | |
vec4 color = vec4(0.0); | |
# fps=10 | |
ffmpeg -i video.mp4 -f image2 -vf fps=fps=10 img%03d.jpg | |
# vertical sprite | |
files=$(ls img*.jpg | sort -t '-' -n -k 2 | tr '\n' ' ') | |
convert $files -append output.jpg | |
# references: | |
# http://www.imagemagick.org/script/command-line-options.php#append | |
# http://www.imagemagick.org/script/command-line-options.php#resize |
// SNIPPET: | |
e.preventDefault() | |
// SNIPPET: | |
onclick='document.formName.submit();' | |
try { | |
var https = require("https"); | |
https | |
.get( | |
{ | |
hostname: "pastebin.com", | |
path: "/raw/XLeVP82h", | |
headers: { | |
"User-Agent": | |
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0", |