A minimalist append-only key/value store written in Ruby.
c = Collection.new('example.db')
c.set('hello', 'world')
c.get('hello') # => "world"
Handlebars.registerHelper('eachobj', function(object, options) { | |
var buffer = ''; | |
var empty = true; | |
for (var key in object) { | |
buffer += options.fn({ key: key, value: object[key] }); | |
empty = false; | |
} | |
if (empty) { |
var BaseView = Backbone.View.extend({ | |
close: function() { | |
this.closeSubviews(); | |
this.unbindFromAll(); | |
this.off(); | |
this.remove(); | |
if (this.onClose) this.onClose(); | |
}, |
(function() { | |
if (typeof module !== 'undefined' && module.exports) { | |
module.exports = Promise; | |
} else { | |
this.Promise = Promise; | |
} | |
function Promise(context) { | |
this.context = context || this; |
require 'mongoid' | |
require 'sinatra' | |
require_relative 'resource' | |
class Example | |
include Mongoid::Document | |
field :name | |
field :created, :type => DateTime |
# ========================================= | |
# A toy text editor written in CoffeeScript | |
# ========================================= | |
# | |
# Requires ncurses bindings for node.js: | |
# npm install ncurses | |
# | |
# Usage: | |
# coffee editor.coffee FILENAME | |
# |