Skip to content

Instantly share code, notes, and snippets.

#!bin/coffee
entity =
post: () -> 'POST'
delete: () -> 'DELETE'
rule =
entity: 'Foo'
read: true
write: true
async = function(path) {
var d;
d = promise.defer();
require('fs').readFile(path, function(err, data) {
if (err) {
return d.reject(err);
}
throw 'CATCHMEIFYOUCAN1';
try {
return d.resolve(1000);
We couldn’t find that file to show.
diff --git a/lib/promise.js b/lib/promise.js
index df6d366..8fcabb3 100644
--- a/lib/promise.js
+++ b/lib/promise.js
@@ -476,6 +476,34 @@ exports.all = function(array){
};
/**
+ * Takes a hash of promises and returns a promise that is fulfilled once all
+ * the promises in the hash keys are fulfilled
Program received signal SIGSEGV, Segmentation fault.
createTable (c=0x831a31c) at alsosql.c:411
411 if (Num_tbls[server.dbid] >= MAX_NUM_TABLES) {
(gdb) where
#0 createTable (c=0x831a31c) at alsosql.c:411
#1 0x0807514d in createCommand (c=0x831a31c) at alsosql.c:455
#2 0x0805aa0a in call (c=0x831a31c, cmd=0x80ad2cc) at redis.c:2693
#3 0x08066a3b in doCommand (c=0x831a31c) at redis.c:2884
#4 processCommand (c=0x831a31c) at redis.c:2797
diff --git a/lib/nodules.js b/lib/nodules.js
index f95fadb..2853901 100644
--- a/lib/nodules.js
+++ b/lib/nodules.js
@@ -679,6 +679,7 @@ exports.protocols = {
var exclamationIndex = uri.indexOf("!");
var target = uri.substring(exclamationIndex + 2);
var targetContents;
+ var origUri = uri;
uri = uri.substring(0, exclamationIndex);
diff -Naur sammy.orig/lib/plugins/sammy.template.js sammy/lib/plugins/sammy.template.js
--- sammy.orig/lib/plugins/sammy.template.js 2010-11-16 19:23:30.508730579 +0300
+++ sammy/lib/plugins/sammy.template.js 2010-11-16 19:23:51.988731323 +0300
@@ -19,22 +19,23 @@
// Generate a reusable function that will serve as a template
// generator (and which will be cached).
fn = srender_cache[name] = new Function("obj",
- "var p=[],print=function(){p.push.apply(p,arguments);};" +
+ "var ___$$$___=[],print=function(){___$$$___.push.apply(___$$$___,arguments);};" +
@dvv
dvv / v3.diff
Created November 24, 2010 14:36
diff --git a/src/ldap_binding.cc b/src/ldap_binding.cc
index c0f31d8..1355ca2 100644
--- a/src/ldap_binding.cc
+++ b/src/ldap_binding.cc
@@ -89,6 +90,7 @@ protected:
char * host = ludpp->lud_host;
int port = ludpp->lud_port;
+ int ver = 3;
'use strict'
facets = {}
#entity = null
for entity in ['Log', 'Session', 'Language', 'Currency', 'Region', 'Country', 'Hit']
facets[entity] = (store) ->
console.log entity
console.log global.entity
#
# how object capabilities can be made by means of kriszyp's Compose
#
# BIG FAT WARNING #1
# Compose internal mixin function treats objects with .get/.set/.value as ES5 property definition
# Opened the issue on that.
# BIG FAT WARNING #2
# methods which are not aspect()ed, can't so far be Compose'd.from()