This file contains hidden or 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 Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var testArray = []; | |
for (var s = 0; s < 5000; s++) { | |
testArray.push(Math.floor(s * 0.1)); | |
} | |
console.log('Testing used ids') |
This file contains hidden or 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 Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var testArray = []; | |
for (var s = 0; s < 5000; s++) { | |
testArray.push(Math.floor(Math.random() * 100)); | |
} | |
console.log('Testing caching') |
This file contains hidden or 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
<script src="1ea296932eacbe248905.js"></script> | |
<script src="0b3a074667143853404c.js"></script> | |
<script src="0dd8c061aff2a2791815.js"></script> | |
<script src="191b812fa5f7504151f7.js"></script> | |
<script src="08702f45497539ef6ea6.js"></script> | |
<script src="195c9326275620b0e9c2.js"></script> | |
<script src="19817b3a0378aedb2143.js"></script> | |
<script src="0e7a65e649387d773247.js"></script> | |
<script src="13167c9702de79d2f4fd.js"></script> | |
<script src="1154be40ff0e8dd16e9f.js"></script> |
This file contains hidden or 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
import React from "react"; | |
import bespoke from "bespoke"; | |
import "styles.css"; | |
// use react components, markdown or plain html files in the slides folder | |
var slidesContext = require.context("./slides", true, /\.(js|md|html)$/); | |
// sort slides by name, name them like this: ./slides/3-section/7-slide.md | |
var slides = slidesContext.keys().sort().map((key) => slidesContext(key)); |
This file contains hidden or 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
import React from "react"; | |
import styles from "./MyComponent.css"; | |
export class MyComponent { | |
render() { | |
return <div className={styles.root}> | |
<div className={styles.inner}> | |
<button className={styles.sendButton}>Send</button> | |
</div> | |
</div> |
This file contains hidden or 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
// webpack is a module bundler | |
// This means webpack takes modules with dependencies | |
// and emits static assets representing those modules. | |
// dependencies can be written in CommonJs | |
var commonjs = require("./commonjs"); | |
// or in AMD | |
define(["amd-module", "../file"], function(amdModule, file) { | |
// while previous constructs are sync | |
// this is async |
This file contains hidden or 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
$.jmpress("template", "nav1", { | |
children: function(idx) { | |
var distanceX = 240; | |
var distanceY = 170; | |
var config = { | |
scale: 0.2, | |
y: -1, | |
x: ((idx%5) - 2) * (1/2), | |
rotateY: 360, | |
secondary: { |