Skip to content

Instantly share code, notes, and snippets.

View cell0.js
class Vertex {
constructor(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
static transform(vertex, matrix) {
return Vertex.fromVec3(matrix.multiply(Vertex.toVec3(vertex)));
}
View cell0.js
const sortShuffle = (arr) => arr.slice().sort(() => 0.5 - Math.random())
function durstenfeldShuffle(array) {
let arr = array.slice();
for (let i = arr.length - 1; i > 0; i--) {
let r = Math.floor(Math.random() * (i + 1));
[arr[i], arr[r]] = [arr[r], arr[i]];
}
return arr
}
View untitled.carbide.md
View untitled.carbide.md
View cell0.js
const tabletojson = require('tabletojson').Tabletojson;
var html = `<table class="wikitable mw-collapsible mw-made-collapsible" style="width:100%; font-size:88%;">
<tbody>
<tr valign="top" style="">
<th>Minor version
</th>
<th><a href="/wiki/WebKit" title="WebKit">WebKit</a> Version
</th>
<th>Operating System
View untitled.carbide.md