Created with wavedrom.com
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script type="WaveDrom"> | |
{ signal : [ | |
{ name: "clk", wave: "p......" }, | |
{ name: "bus", wave: "x.34.5x", data: "head body tail" }, | |
{ name: "wire", wave: "0.1..0." }, | |
]} | |
</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
var esprima = require('esprima'); | |
var res = {}; | |
res.process = typeof process; | |
res.window = typeof window; | |
res.document = typeof document; | |
res.module = typeof module; | |
res.exports = typeof exports; | |
res.require = typeof require; |
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
var createScene = require('gl-plot3d') | |
var createMesh = require('gl-mesh3d') | |
var bunny = require('teapot') | |
var scene = createScene() | |
var mesh = createMesh({ | |
gl: scene.gl, | |
cells: bunny.cells, | |
positions: bunny.positions, |
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
{ | |
b0: { | |
i0 = 1 | |
i1 = 2 | |
i2 = add(i0, i1) | |
branch(i2, b2, b1) | |
} | |
b1: { | |
i4 = 'ok' | |
jump(b3) |
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
{ | |
i0 = 1 | |
i1 = 2 | |
i2 = add(i0, i1) | |
ret(i2) | |
} |
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
var expect = require('chai').expect; | |
function dut (n) { | |
var i, result = []; | |
for (i = 0; i < n; i++) { | |
result.push(i); | |
} | |
return result; | |
} |
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
var hl = require('highlight.js') | |
var root = document.createElement('pre') | |
root.innerHTML = hl.highlightAuto('function foo (a) {\n return a+1;\n}').value | |
document.body.appendChild(root) |
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
var hl = require('highlight.js') | |
var root = document.createElement('pre') | |
root.innerHTML = hl.highlightAuto('function foo(a){\n return a+1\n}').value | |
document.body.appendChild(root) |
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
var hl = require('highlight.js'), | |
insertCss = require('insert-css'); | |
var hljsGetFromSomeWhere = '.hljs-keyword { color: #333; font-weight: bold;}'; | |
insertCss(hljsGetFromSomeWhere); | |
var root = document.createElement('pre') | |
root.innerHTML = hl.highlightAuto('function foo(a){\n return a+1\n}').value | |
document.body.appendChild(root); |
OlderNewer