Skip to content

Instantly share code, notes, and snippets.

guest271314

Block or report user

Report or block guest271314

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View replacetrack.mkv
This file has been truncated, but you can view the full file.
View draw_base64_image_to_canvas_without_img_onload.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<canvas></canvas>
<script>
(async() => {
const canvas = document.querySelector("canvas");
const data = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAXdElEQVR4nO2de3QU133Hv7taSSsJSUhIZiWEkEEIhF47d3kIkAwCCb14Cq12HjJR3NipT9LmJG2a9jSxcR5NUp8kpU1SJ+lxT5Pm0TQ5rZNjB2MDfmEb2/UTDLYTg40TgzGOsY15Srd/rJYs0u7OndmZndXy+5zz/Uuw+5vf7/eduXvnzh2AIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIAiCIDIKxtgIY+w+E7rT6dgJImkkSfoiY4yb0CGnYyeIpCEDEFc1ZADiaqMYwFIA1wP4zLXXXvuIGQM0NzefADAMYDGAaU4eEEHEowbAIICvA7gfwB8A8GhVVFSYOfvzRYsW8Qmf9RqAuwFsB9AHoDzVB0sQ0wBsBnAHgKOY0OyxZKEBJmoMwNMAvgxgBQB3yrJAXFXkANgE4GcAPoRA0yM1BpioYwD+EUBzSrJCZDw1AHYAOA2DTQ9nDBCtZwDcBCDP5hwRGUgVgO8BOI8kGh/OGiCiIwBGAGTZmC8iQyhA+Mes4WFOIjlsgIgOAOi0LXPElKcH4bOllU2XTgbgCP9ovhNAiT0pJKYieQB+CBsaP6I0MkBEbwFYa0MuiSmGD8A+2Nj8SE8DcADnANxoeUaJKUMLgN/D5uZH+hogoh2g+wdXHYsQHgakosHS3QAcwLcBuKxMMJG+zEH4hlGqmmsqGIAD+KaFOSbSlBIALyGFzY+pYwAO4LOWZZpIO9wAfo0UNz+ml
@guest271314
guest271314 / nameofall.js
Created Jun 21, 2019
nameofall: Get all const, let, class variables names as strings
View nameofall.js
// https://esdiscuss.org/topic/what-do-you-think-about-a-c-6-like-nameof-expression-for
// TODO handle destructuring assignment, default values, shorthand assignments, e.g.,
/*
const [{
a = 1,
b = 2
}, cd] = [...[source]];
*/
/*
usage sourceCode.match(nameofall); // ["const x", "let z"];
@guest271314
guest271314 / image.png
Created Jun 17, 2019
image from context.transferFromImageBitmap(imageBitmap) canvas.toDataURL()
View image.png
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAgAElEQVR4nOzddXxUV/rH8Wc87u6BuCdEIcTdQxLiECIEEgIRLCG4uxWKl0Kh1AulpUqFert1N+puW9nfbtvt5/fHYO1SVthudtv7x/s1mcnk5pm5M/Odc+4554qIoFAoFAqF4n/ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqFQqFQKC7ekBegUCgUCoXi4g15AQqF4h+kFkF7ivof+RuVoFKpftFQPx6FQvFvNeQFKBSKf8DpMNefoj7lQoH99wz1Y1IoFP9WQ16AQqH4B6jkp4GuPX27EugKhcJoyAtQKBT/ALWcDXOd/GOBrhEl0BWK35EhL0ChUPwDzm2da04R+eVA14gS6ArF78yQF6BQKM7rp4H78+Pnp29XAl2hUJwy5AUoFIrzUnE21FWI6FCLHo2YIqJHRIuI+oKBrlUCXaH4PRnyAhSKX4/6HKqfXVf/Gv9T9Qs/n+9+Z39/esT639u+WlSoRXvqbzWIaNCIBpVKg4j6zLY0ImhFhV5UaFSCRnX2f6hFjfqCtclP6tKoBdU5NKdo1YJeqzlDp1Gh+tlzqlPr0GsM6NQ64xeIU8
View gist:f8f3e1cf2427259dbfb0559527a25284
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@guest271314
guest271314 / firefox_webm.xml
Created May 5, 2019
Firefox getDisplayMedia MediaRecorder webm mkv2xml
View firefox_webm.xml
This file has been truncated, but you can view the full file.
<mkv2xml>
<EBML>
<EBMLVersion>1</EBMLVersion>
<EBMLReadVersion>1</EBMLReadVersion>
<EBMLMaxIDLength>4</EBMLMaxIDLength>
<EBMLMaxSizeLength>8</EBMLMaxSizeLength>
<DocType>webm</DocType>
<DocTypeVersion>2</DocTypeVersion>
<DocTypeReadVersion>2</DocTypeReadVersion>
@guest271314
guest271314 / chromium_webm.xml
Created May 5, 2019
Chromium getDisplayMedia MediaRecorder webm mkv2xml
View chromium_webm.xml
This file has been truncated, but you can view the full file.
<mkv2xml>
<EBML>
<EBMLVersion>1</EBMLVersion>
<EBMLReadVersion>1</EBMLReadVersion>
<EBMLMaxIDLength>4</EBMLMaxIDLength>
<EBMLMaxSizeLength>8</EBMLMaxSizeLength>
<DocType>webm</DocType>
<DocTypeVersion>4</DocTypeVersion>
<DocTypeReadVersion>2</DocTypeReadVersion>
You can’t perform that action at this time.