Skip to content

Instantly share code, notes, and snippets.

@git-thinh
git-thinh / README.md
Created June 6, 2024 10:41 — forked from ilblog/README.md
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
@git-thinh
git-thinh / README.md
Created June 6, 2024 10:16 — forked from veltman/README.md
Gif rendering - SVG to GIF

Testing in-browser gif generation from an SVG with gif.js. Works in recent Chrome/Safari/Firefox.

Process:

  1. Create a standard SVG line chart.
  2. Step through in-between frames of the line chart: for each one, update the SVG, render to an image, add the image element to a stack of gif frames.
  3. Render frames together in the background using gif.js web workers.
  4. When rendering's complete, add the blob URL as an image and start the SVG on an infinite loop with d3.timer (gratuitous).

See also: Gif Globe, Gif New Jersey

@git-thinh
git-thinh / IIS_Verbs.config
Created May 16, 2024 09:15 — forked from jalalhejazi/IIS_Verbs.config
CORS: Web.config to enable CORS
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/>
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
</customHeaders>
</httpProtocol>