Skip to content

Instantly share code, notes, and snippets.

View adamrights's full-sized avatar

Adam Bedell adamrights

View GitHub Profile
@adamrights
adamrights / Enum.es6.js
Last active August 26, 2015 02:14 — forked from xmlking/Enum.es6.js
JavaScript Enums with ES6, Type Checking and Immutability
export class EnumSymbol {
sym = Symbol.for(name);
value: number;
description: string;
constructor(name: string, {value, description}) {
if(!Object.is(value, undefined)) this.value = value;
if(description) this.description = description;
@adamrights
adamrights / test.html
Last active August 26, 2015 02:16 — forked from xmlking/test.html
Demonstrate streaming JSON data parsing with OboeJS lib. Client consuming streaming REST endpoint implemented using NodeJS/RxJava/Ratpack etc and -chunked transfer- encoding
<html>
<head>
<title>OboeJS demo</title>
<script src="https://rawgit.com/jimhigson/oboe.js/v2.1.2/dist/oboe-browser.min.js"></script>
</head>
<body>
<div ></div>
<ul id="content">
<li>AUD_CAD:</li>
</ul>
@adamrights
adamrights / 0_reuse_code.js
Created September 23, 2015 19:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console