Skip to content

Instantly share code, notes, and snippets.

@Hypercubed
Hypercubed / index.js
Last active February 6, 2016 10:30
requirebin sketch
var typed = require("typed-function");
typed.addType({
name: 'zero',
test: function (x) { return x === 0; }
});
typed.addType({
name: 'one',
test: function (x) { return x === 1; }
@Hypercubed
Hypercubed / index.js
Created February 6, 2016 10:27
requirebin sketch
var typed = require("typed-function");
typed.addType({
name: 'zero',
test: function (x) { return x === 0; }
});
typed.addType({
name: 'one',
test: function (x) { return x === 1; }
@Hypercubed
Hypercubed / index.js
Created February 6, 2016 10:27
requirebin sketch
var typed = require("typed-function");
typed.addType({
name: 'zero',
test: function (x) { return x === 0; }
});
typed.addType({
name: 'one',
test: function (x) { return x === 1; }
@Hypercubed
Hypercubed / index.js
Created January 28, 2016 11:05
requirebin sketch
"use strict";
var Decimal = require("decimal.js");
var x = new Decimal(-5);
console.log(x, x.isNeg()); // prints Decimal {s: -1, e: 0, d: Array[1]} true
x.cos(); // should not alter x
console.log(x, x.isNeg()); // prints Decimal {s: 1, e: 0, d: Array[1]} false
@Hypercubed
Hypercubed / config.js
Last active January 6, 2016 11:25
systemjs-twitter-widgets
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: false,
paths: {
"twitter": "//platform.twitter.com/widgets.js" // must be a path, map will cause an error when bundling (May change in SystemJS Builder v0.15)
},
meta: {
"twitter": {
@Hypercubed
Hypercubed / .gitignore
Last active December 11, 2015 08:45
plotly-jspm
jspm_packages
@Hypercubed
Hypercubed / .gitignore
Last active December 1, 2015 09:57
plotly-jspm
jspm_packages
@Hypercubed
Hypercubed / index.html
Last active May 20, 2016 18:42
dist/plotly.js - Source Map Explorer
<!doctype html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.rawgit.com/martine/webtreemap/a5c3115092f3ce97c6544aff4af465a88010f01d/webtreemap.css">
<title>dist/plotly.js - Source Map Explorer</title>
<style>
html, body {
height: 100%;
}
@Hypercubed
Hypercubed / .gitignore
Last active November 12, 2015 09:21
svgsaver crowbar
node_modules