This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'] }), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |