A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| { | |
| ".123" : "application/vnd.lotus-1-2-3", | |
| ".3dml" : "text/vnd.in3d.3dml", | |
| ".3g2" : "video/3gpp2", | |
| ".3gp" : "video/3gpp", | |
| ".a" : "application/octet-stream", | |
| ".aab" : "application/x-authorware-bin", | |
| ".aac" : "audio/x-aac", | |
| ".aam" : "application/x-authorware-map", | |
| ".aas" : "application/x-authorware-seg", |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
| Name | Stars | Last Commit | Description |
|---|---|---|---|
| three.js | ![GitHub Rep |
| // @return Promise<boolean> | |
| async function askWritePermission() { | |
| try { | |
| // The clipboard-write permission is granted automatically to pages | |
| // when they are the active tab. So it's not required, but it's more safe. | |
| const { state } = await navigator.permissions.query({ name: 'clipboard-write' }) | |
| return state === 'granted' | |
| } catch (error) { | |
| // Browser compatibility / Security error (ONLY HTTPS) ... | |
| return false |
| # The command finds the most recent tag that is reachable from a commit. | |
| # If the tag points to the commit, then only the tag is shown. | |
| # Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
| # and the abbreviated object name of the most recent commit. | |
| git describe | |
| # With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
| git describe --abbrev=0 | |
| # other examples |
| function getData() { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| resolve(1) | |
| },2000) | |
| }) | |
| } | |
| async function get() { |
| |
| function getPrecision(value) { | |
| const valueString = value.toString(); | |
| if (valueString.indexOf('e-') >= 0) { | |
| return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10); | |
| } | |
| let precision = 0; | |
| if (valueString.indexOf('.') >= 0) { | |
| precision = valueString.length - valueString.indexOf('.') - 1; | |
| } | |
| return precision; |
function throttle(fn,wait=3000){
let lastTime = Date.now(),
timeFlag = null
return function(...args){
let current = Date.now()
clearTimeout(timeFlag)
| <!DOCTYPE HTML> | |
| <html lang="en"><head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>Zooming via HTML5 Canvas Context</title> | |
| <style type="text/css" media="screen"> | |
| body { background:#eee; margin:1em; text-align:center; } | |
| canvas { display:block; margin:1em auto; background:#fff; border:1px solid #ccc } | |
| </style> | |
| </head><body> |