[ Launch: Lorenz Curve ] 9767676 by stevekinney
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS 3D Physics</title> | |
<style> | |
body { margin: 0; } | |
</style> | |
</head> | |
<body> | |
<script src="js/three.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// long version | |
function loadExt(files, after) { | |
var _this=this; | |
_this.files = files; | |
_this.js = []; | |
_this.head = document.getElementsByTagName("head")[0]; | |
_this.after = after || function(){}; | |
_this.loadStyle = function(file) { | |
var link = document.createElement("link"); | |
link.rel = "stylesheet"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="clmtrackr.js"></script> | |
<script src="model_pca_20_svm.js"></script> | |
<script src="p5.js"></script> | |
<script src="p5.dom.js"></script> | |
<script> | |
var ctracker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global createImageBitmap */ | |
function loadImageWithImageTag(src) { | |
return new Promise((resolve, reject) => { | |
const img = new Image; | |
img.crossOrigin = ''; | |
img.src = src; | |
img.onload = () => { resolve(img); }; | |
img.onerror = () => { reject(img); }; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 使用 userAgent 判断是否微信内置浏览器 | |
// 不推荐使用 用户可能会自行修改浏览器的 userAgent | |
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
return true; | |
} | |
// 使用微信 JS 对象判断是否微信内置浏览器 | |
// 建议使用此方法进行判断 | |
if( typeof WeixinJSBridge !== "undefined" ) { | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// relies on Date.now() which has been supported everywhere modern for years. | |
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values | |
// if you want values similar to what you'd get with real perf.now, place this towards the head of the page | |
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed | |
(function(){ | |
// prepare base perf object |
NewerOlder