Skip to content

Instantly share code, notes, and snippets.

Jayson Harshbarger Hypercubed

Block or report user

Report or block Hypercubed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
acutmore /
Last active Feb 14, 2020
Emulating a 4-Bit Virtual Machine in (TypeScript\JavaScript) (just Types no Script)

A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.

Syntax emits zero JavaScript.

type RESULT = VM<
    ["push", N_1],         // 1
    ["push", False],       // 2
    ["peek", _],           // 3
developit / *
Last active Feb 1, 2020
🐻 Valoo: just the bare necessities of state management. 150b / 120b.
View *

🐻 valoo

just the bare necessities of state management.


Hotlink it from

See Interactive Codepen Demo.

matthewp /
Last active Mar 28, 2016


Writing JavaScript libraries that are stable is hard, too hard. The extreme level of modularity we practice has only made things worse, as it's become very easy to depend on quirks/bugs that exist in other libraries.

The approach that is most often taken to increase stability in a programming language is to introduce Types. That is, trade expressiveness for better static reasoning. The point being, the compiler should be able to find bugs in your program.

I'm interested in another approach; make it easier for the developer to find bugs themselves. To that end, the motivation for this language is to be easy to test. What if everything within a programs closure was available to be mocked.

exports.getName = function(person){
bterlson / mod.js
Last active Jan 26, 2017
Module export forms have subtle differences
View mod.js
// exporter1.js
let foo = 1;
export { foo as default }; // exports the foo binding
foo = 2;
// exporter2.js
let foo = 1;
export default foo; // creates a new binding named *default* and initializes it to 1.
foo = 2; // assigns to the foo binding which is not exported
bishboria /
Last active Feb 15, 2020
Springer made a bunch of books available for free, these were the direct links
View .gitignore
zachlysobey / ng-directive-inline-multi-line-template-string.es6.js
Last active Mar 3, 2016
Angular 1 Directive with ES6 Multi-line string template inline.
View ng-directive-inline-multi-line-template-string.es6.js
(function() {
'use strict';
.directive('myDirective', myDirective);
const template = `
<div class="my-directive-template">
<h1>Using multi-line Strings for templates</h1>
Hypercubed / directive.js
Last active Jun 3, 2016
Use systemjs/plugin-text to import html directly to $routeProvider or $templateCache, works great with jspm bundle.
View directive.js
import somethingHTML from './something.html!text';
.directive('myDirective', function() {
return {
template: somethingHTML

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

You can’t perform that action at this time.