Skip to content

Instantly share code, notes, and snippets.

@kirjavascript
kirjavascript / index.html
Last active Jan 9, 2016
signature scrawler
View index.html
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head><title>thom</title></head>
<style>
svg{position:absolute;top:0;left:0;right:0;bottom:0;background:whitesmoke}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script>
@kirjavascript
kirjavascript / index.html
Last active Jan 15, 2016
Nested data binding
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.min.js"></script>
<script>
View index.html
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>X3DOM page</title>
<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script>
<script src="https://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<x3d width='500px' height='400px'>
</x3d>
@kirjavascript
kirjavascript / index.html
Created Feb 4, 2016
d3.js + x3dom + WebGL = rubik test
View index.html
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>kCube</title>
<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>
<style>
x3d {
position:absolute;
View index.html
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>kCube</title>
<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>
<style>
x3d {
position:absolute;
View index.html
<meta charset="utf-8">
<style>body{font-size:28px}</style>
<body></body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script>
var a =
`function readtime(time) {
if (time == 'DNF') { return time; }
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);
View mfp.html
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head><title>calories</title></head>
<body>
</body>
<style>
.bar {
fill: steelblue;
@kirjavascript
kirjavascript / .block
Last active Aug 27, 2016
rainbow maze
View .block
height: 1000
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('')