Skip to content

Instantly share code, notes, and snippets.

all: synchronizer
#
synchronizer:
synchronizer lib/index.js > dist/out.js
@@make test
# R.js includes the `baseUrl` in the module normalization which incorrectly
# contextualizes it to the wrong location.
#
@denisdefreyne
denisdefreyne / mustache_plus_nanoc.md
Last active December 30, 2015 06:29
Mustache + nanoc requirements

Goal: excellent Mustache support in nanoc

Need alternatives for:

  • <%= item[:blah] %>{{ item:blah }}
  • <%= item.path %>{{ item.path }}
  • <%= layout[:blah] %>{{ layout:blah }}
  • <%= config[:blah] %>{{ config:blah }}
  • <%= some_helper(…) %> → ???
  • &lt;% some_helper(…) do %&gt;…&lt;% end %&gt; → ???
@dherman
dherman / realms-api.md
Last active March 8, 2024 07:04
ES6 Realms API

Notational Conventions

This section describes the conventions used here to describe type signatures.

A [T] is an array-like value (only ever used read-only in this API), i.e., one with an integer length and whose indexed properties from 0 to length - 1 are of type T.

A type T? should be read as T | undefined -- that is, an optional value that may be undefined.

Realms

@paultag
paultag / info.md
Last active December 10, 2015 02:09
Hython Runtime

tl;dr

PyPy is ruddy fast. So is Hy.

Time of fib(9), using a simple recursive implementation.

@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;
@cowboy
cowboy / shmemplates.js
Created September 27, 2011 16:28
shmemplates. req: needs to work x-domain and be fully cacheable
// For Mike.
Bocoup.utils.template = (function($) {
// Request a template from the server. Returns a Deferred object.
function fn(key) {
return $.Deferred(function(dfd) {
if (key in fn.cache) {
dfd.resolve(fn.cache[key]);
} else {
$.getScript(fn.url + key, function() {
@rwaldron
rwaldron / pre-contenteditable
Created June 11, 2011 21:45
Extension of Paul Irish's cute TXJS demo. Paste into location bar
data:text/html,<pre contenteditable><script>document.body.firstChild.focus()</script>