Skip to content

Instantly share code, notes, and snippets.

diff --git a/modules/helma/skin.js b/modules/helma/skin.js
index e35627b..b6e3928 100644
--- a/modules/helma/skin.js
+++ b/modules/helma/skin.js
@@ -38,7 +38,7 @@ function render(skinOrResource, context, scope) {
} else {
throw Error("Unknown skin object: " + skinOrResource);
}
- return skin.render(context);
+ return skin.render(context, scope);
var Config = function(){};
Config.prototype.a = 100;
Config.prototype.b = 200;
var Flags = function() {};
Flags.prototype = new Config();
Flags.constructor = Flags;
Flags.prototype.a = 3;
Flags.prototype.c = 5;
helma> var File = require('file')
helma> var outFile = File.open('/tmp/ng.test', 'w')
helma> outFile.write('foo bar')
[object Object]
helma> outFile.flush()
[object Object]
helma> outFile.close()
helma> var inFile = File.open('/tmp/ng.test', 'r')
helma> inFile.read()
foo bar
RED=`echo -en '\e[31m'`
YELLOW=`echo -en '\e[93m'`
RESET=`echo -en '\e[00m'`
tail -f file | sed -E "s/([0-9]+)/$RED\1$RESET/g;s/(\"[^\"]*\")/$YELLOW\1$RESET/g"
http://stackoverflow.com/questions/510202/apply-formatting-to-unix-shell
var client = require('ringo/httpclient')
var options = {
// exchange
'data': {},
'headers': {},
'method': 'GET',
'contentType': 'application/x-www-form-urlencoded;charset=utf-8',
'username': '',
'password': '',
include('ringo/unittest');
include('ringo/scheduler');
var log = require('ringo/logging').getLogger(module.id);
var client = require('ringo/httpclient');
var Server = require('ringo/httpserver').Server;
var server;
var app = function(env) {
include('ringo/webapp/request');
var info = function() {
console.log.apply(this, arguments);
}
/**
* node, one tile on the map.
*/
var Node = function(x, y, cost, xparent, yparent) {
this.key = x + '.' + y;
this.x = x;
var {get, post, request, HttpClient} = require('ringo/httpclient');
// Exchange holds all information regarding request and response.
// All the callbacks get it and it's returned by every shortcut function.
var exchange = get('http://example.org',
{'paramFoo': 'bar'}, // <- can also be a stream
function success (content, status, contentType, exchange){};
function error (exception, httpExchange)
);

FIXME ADD:

  • create admin interface to explain:
    • write your own macros & filterss!!
    • DONE url mapping
    • DONE method dispatching
    • middleware (auth)
    • DONE more involved actions. request object, different response
    • filestore relations for comments -> post
  • file upload. image for blog entries
"""
+M
+P
+C
+A
nur t%cod bis zum naechsten *
sd3: 20, pro user *JAN, *MUT, *LEN
danach + oder |