This file contains hidden or 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
# ruby resize.rb <path-to-hi-res-icon> | |
[29,40,58,76,80,87,120,156,180].each do |n| | |
`convert "#{ARGV[0]}" -resize #{n}x#{n} "#{n}.png"` | |
end |
This file contains hidden or 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 hidden or 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; | |
var pogo = require('pogo'); | |
var code = "h 'h1' 'Edit me'"; | |
function render(model) { | |
return h('div', | |
h('textarea#read', { | |
style: textAreaStyle, | |
binding: [model, 'code'], |
This file contains hidden or 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; | |
var pogo = require('pogo'); | |
var code = "h 'h1' 'Edit me'"; | |
function render(model) { | |
return h('div', | |
h('textarea', { | |
style: textAreaStyle, | |
binding: [model, 'code'], |
This file contains hidden or 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('article', h('.title', { | |
onblur: function(e) { | |
model.title = e.target.innerText.replace(/\n/g, ""); | |
e.target.innerHTML = '<h1>' + model.title + '</h1>'; | |
}, | |
attributes: { contenteditable: true }}, |
This file contains hidden or 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 hidden or 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 routism = require('routism'); | |
var routes = routism.compile([{ pattern: '/fruit/:name', route: 'fruit' }]); | |
var path = '/fruit/granny+smith'; | |
document.body.innerHTML = JSON.stringify(routes.recognise(path)); |
This file contains hidden or 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
public class MutationBuilder<T> implements Builder<T> { | |
protected Factory<T> factory; | |
protected MutationBuilder(Factory<T> factory) { | |
this.factory = factory; | |
this.mutations = new ArrayList<Mutation<T>>(); | |
} | |
protected interface Mutation<T> { |
This file contains hidden or 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 inspect = require('plastiq-inspect'); | |
plastiq.append(document.body, function() { | |
return inspect({ | |
x: [1,2,"three"], | |
y: { z: [4,5,6] } | |
}); | |
}); |
This file contains hidden or 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 client = require('browserify-client').connect('http://95.85.22.215:4000'); | |
client.require('plastiq', '1.0.0', function(err, plastiq) { | |
plastiq.attach(document.body, function() { | |
return plastiq.html('p', 'plastiq was required dynamically'); | |
}); | |
}); |