Skip to content

Instantly share code, notes, and snippets.

View davay42's full-sized avatar
✌️
Open source development for amazing future ✨

davay davay42

✌️
Open source development for amazing future ✨
View GitHub Profile
@davay42
davay42 / Matter.RenderSVG.js
Created May 26, 2024 05:08 — forked from taylor8294/Matter.RenderSVG.js
The `RenderSVG` module is an SVG alternative to the Matter.js built-in canvas-based renderer.
/**
* Overwrite `Common.isElement` to allow for SVG elements also
*/
Matter.Common.isElement = function(obj) {
try {
return obj instanceof HTMLElement || obj instanceof SVGElement;
} catch (e) {
return (typeof obj === "object") &&
(obj.nodeType === 1) && (typeof obj.style === "object") &&
(typeof obj.ownerDocument === "object");
@davay42
davay42 / GenerateAudioWaveform
Created July 3, 2023 05:58 — forked from jessuni/GenerateAudioWaveform
Audio Oscilloscope (Frequency Byte) - w/ web audio API and canvas
// rename gist
@davay42
davay42 / sendBlobJson.js
Created April 24, 2023 10:55 — forked from Dletta/sendBlobJson.js
sending JSON objects via Blobs
var obj = {name:"test", result:"hello world"};
var string = JSON.stringify(obj);
console.log(obj)
var arr = [];
encode = Array.from(string);
while(encode.length>0){
arr.push(encode.shift().charCodeAt(0));
}
var u16 = new Uint16Array(arr);
var blob = new Blob([u16], {type:'application/json'});
@davay42
davay42 / index.html
Created April 24, 2023 10:54 — forked from Dletta/index.html
Gun in Service Worker
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Concept Chat</title>
<link rel="stylesheet" href="index.css" >
</head>
<body>
@davay42
davay42 / plink-plonk.js
Created February 23, 2020 21:18 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@davay42
davay42 / README.md
Created September 3, 2018 19:51 — forked from christophermanning/README.mkd
Hamiltonian Graph Builder
<style type="text/css">p {text-align:center;width: auto}</style>

Created by Christopher Manning

Gallery

Axle Eight Fibbobaci Florets [![Star]