Skip to content

Instantly share code, notes, and snippets.

@joshski
joshski / index.js
Created February 2, 2015 21:49 — forked from refractalize/index.js
requirebin sketch
var plastiq = require('plastiq');
var h = plastiq.html;
function render(model) {
return h('div.content',
h('h1', 'People'),
h('ol',
model.people.map(function (person) {
return renderPerson(model, person);
})
@joshski
joshski / index.js
Last active August 29, 2015 14:14 — forked from refractalize/index.js
REPL
// a little pogo/plastiq REPL
var plastiq = require('plastiq');
var h = plastiq.html;
var pogo = require('pogo');
var example = "h 'h1' 'Edit me!'";
function render(model) {
return h('div',
h('textarea', { style: textAreaStyle, binding: [model, 'code'] }),
@joshski
joshski / patterns.js
Created July 8, 2011 14:16 — forked from jcleveley-zz/patterns.js
Javascript patterns
// namespace - single global variable for all news JS
var news = news || {};
// Example of a singleton as a revealing module
// When you only need one of something
news.preferences = (function (app, global) {
// Private variables
var persistent = true;
import System.IO
import Network
import Minecraft
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Trans
import Control.Monad.BinaryProtocol
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TChan