Skip to content

Instantly share code, notes, and snippets.

View gist:8d86bd8083bf3293fe3c479fd70a3834
### Keybase proof
I hereby claim:
* I am nhunzaker on github.
* I am nhunzaker (https://keybase.io/nhunzaker) on keybase.
* I have a public key ASBfUd8iUn88ILVhWT4YszwRcQdnFkBaambe5RhIYg4jDwo
To claim this, I am signing this object:
View workbook.el
(defun nh/today-as-string ()
"Today, as a string."
(format-time-string "%y.%m.%d"))
(defun current-workbook ()
"Location of the current workbook log file."
(concat "~/.org/worklog/" (nh/today-as-string) ".org"))
(defun workbook ()
"Opens up my workbook."
View microcosm.next.md

Next Microcosm

I've had a couple of things on my mind with regard to the next version of Microcosm.

A client-side version of GraphQL

I want to be able to build out a Microcosm state tree using GraphQL. A single document would automatically produce a fast, well documented, easily configurable Microcosm setup. For example:

type Author {
@nhunzaker
nhunzaker / react-dom.cjs.js
Last active Aug 16, 2017
Current as of 7e297e9b20d75ee9cc39aadf7e83133af1869881
View react-dom.cjs.js
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
var aa = require("react"),
ba = require("fbjs/lib/invariant"),
l = require("fbjs/lib/ExecutionEnvironment"),
n = require("object-assign"),
ca = require("fbjs/lib/EventListener"),
w = require("fbjs/lib/emptyFunction"),
da = require("fbjs/lib/emptyObject"),
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View html-props.md

Number

  • cellPadding
  • cellSpacing
  • colSpan
  • coords
  • height
  • high
  • low
  • marginHeight
View html-props.md

Number

  • cellPadding
  • cellSpacing
  • colSpan
  • coords
  • height
  • high
  • low
  • marginHeight
View example.test.js
describe('Jest Electron Runner', function() {
it('has access to the window', function() {
expect(window).toEqual(global)
})
it('has access to the document', function() {
expect(document).toEqual(global.document)
})
@nhunzaker
nhunzaker / index.html
Created Dec 10, 2016
Object.create vs shallow clone #jsbench #jsperf (http://jsbench.github.io/#ab0f9152b4a3df689cbfe98062adf36e) #jsbench #jsperf
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object.create vs shallow clone #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View bubble.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Delegation</title>
</head>
<body>
<div id="container">Loading...</div>
<script src="../../lib/react.js"></script>