Skip to content

Instantly share code, notes, and snippets.

View wasm.js
// regpack version
_="m=zInstance(zModule(v[0,97q5{9~|||~^3Z,96|~`7,3^0Zj4^2Zq2|j5^1Z|~,6`9}j7~46},2,6{9{1{9q1q4`1,2j5{4_||{^8Z^2}Yq~46ZY`,72_,32,87q1q4{8{0|])));h=vkmemory.buffer);s='';for(i=khello();h[i];i++)s+=String.fromCharCode(h[i]);console.log(s)~,1}`8`8`8|j0{~0znew WebAssembly.vnew Uint8Array(q~1km.exports.j|,`~2_{1{8{8q1^~3Z}~Yj65~6q";for(i of"YZ^_`jkqvz{|}~")with(_.split(i))_=join(pop());eval(_)
https://wasdk.github.io/WasmFiddle/?wvzhb
// failed idea
WebAssembly.instantiate(new Int8Array([0,97,115,109,1,0,0,0,4,132,128,128,128,0,1,112,0,0,5,131,128,128,128,0,1,0,1,6,129,128,128,128,0,0,7,138,128,128,128,0,1,6,109,101,109,111,114,121,2,0,11,155,128,128,128,0,2,0,65,16,11,12,72,101,108,108,111,32,87,111,114,108,100,0,0,65,28,11,4,16,0,0,0])).then(q=>console.log([...new Int8Array(q.instance.exports.memory.buffer)].slice(16,27).map(a=>String.fromCharCode(a)).join``))
// change name to e
m=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,133,128,128,128,0,1,96,0,1
View thing.js
const http = new Proxy({}, {
get(t, k) {
const url = `https://crossorigin.me/http://${k.replace(/_/g, '.')}`;
return new Proxy({}, {
get(t, k) {
fetch(url)
.then(res => res.text())
.then(res => {
(new Function(`return (${k})(\`${res.replace(/`/g, '\\`')}\`)`))()
});
@kirjavascript
kirjavascript / animate.js
Last active Jul 6, 2017
animation primitives
View animate.js
// Usage;
//
// tween((t) => {
// const i = lerp(-20, 100, ease(t));
// console.log(i);
// }, 500);
function tween(callback, ticks = 500) {
let timer = performance.now();
View toString.js
toString[(""+toString)[!!toString+!!toString]+(""+!toString)[+!!toString]+(+(+[!+toString+!+toString]+[!+toString+!+toString])).toString(+([!+toString+!+toString]+[!+toString+!+toString+!+toString]))+(!!toString+toString)[!+toString+!+toString+!+toString]]
@kirjavascript
kirjavascript / index.html
Last active May 20, 2020
d3 webGL force graph with PIXI.js
View index.html
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>d3 webGL force graph with PIXI.js</title>
<meta name="description" content="">
<meta name="theme-color" content="#000000">
</head>
<body>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default"></script>
View index.html
onload=(b,c=`<`+`span style="color:#`)=>{`
<script src=#></script><div> #kirjavaquine </div>
`;document.body.innerHTML=`onload=${onload}`
.split('\n').map(d=>d.match(/\W|\w*/g)
.map(d=>(c+`17bf702a2d22`.match(/.../g)[`>{%'<#/script=(;"})`.indexOf(d)%4]+`">${d+`<`}/span>`))
.join('')).join('<'+'br/>')}
View index.html
onload=(b,a='&'+'#x02005;',c=`<`+`span style="color:#`)=>document.querySelector('div').innerHTML=a+a+`
<script src=#></script><div> #kirjavaquine </div>
`.match(/\W|\w*/g).map(d=>(c+`17bf702a2d22`.match(/.../g)[`>div<#/script`.indexOf(d)%4]+`">${d+`<`}/span>`)).join('')
@kirjavascript
kirjavascript / .block
Last active Aug 27, 2016
rainbow maze
View .block
height: 1000
View mfp.html
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head><title>calories</title></head>
<body>
</body>
<style>
.bar {
fill: steelblue;
View index.html
<meta charset="utf-8">
<style>body{font-size:28px}</style>
<body></body>
<script>
`function readtime(time) {
if (time == 'DNF') { return time; }
time = parseInt(time);
var min = 0;
var sec = (Math.floor(time/1000)%60);
min = Math.floor(time/60000);