Skip to content

Instantly share code, notes, and snippets.

@anabelle2001
anabelle2001 / mermaid.md
Last active August 24, 2023 19:41 — forked from martinwoodward/mermaid.md
GitHub HTML Rendering Pipeline

Hello, World!

sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
 viewscreen->>iframe: html & javascript
@anabelle2001
anabelle2001 / keybase.md
Last active July 30, 2023 15:44
keybase.md

Keybase proof

I hereby claim:

  • I am anabelle2001 on github.
  • I am anabelle2001 (https://keybase.io/anabelle2001) on keybase.
  • I have a public key whose fingerprint is 1776 3D6A 4032 827C F0C7 DF70 4F95 5212 E498 2166

To claim this, I am signing this object:

//tableout.js -- Beau Vandenburgh
//converts an array of objects or a 2d array into a fancy spaced out table
//MIT liscence
function tableout (data,padding_val){
if(+padding_val==NaN){
console.info("The padding value (args[1]) is not a number, so it will default to 2. here's the trace:")
console.trace()
padding_val=2;
}
// Math normalize - By Beau Vandenburgh (MIT Licensed)
Math.normalize = function(value, min, max) { //converts range from min - max to 0 - 1
* return (value - min) / (max - min)
}
Math.map = function(value, minin, maxin, minout, maxout) { //convers value from range minin,maxin to range minout,maxout
return Math.denormalize(Math.normalize(value, minin, maxin), minout, maxout);
}
Math.denormalize = function(value, start, stop) { //converts range from 0 - 1 to start - stop