Skip to content

Instantly share code, notes, and snippets.

View goloroden's full-sized avatar
💭
The best way to predict the future is to invent it.

Golo Roden goloroden

💭
The best way to predict the future is to invent it.
View GitHub Profile
@goloroden
goloroden / app.js
Created October 15, 2014 07:57
Listen for data
'use strict';
var net = require('net');
net.createServer(function (socket) {
socket.resume();
socket.once('end', function () {
socket.removeAllListeners();
});
}).listen(3000);
@goloroden
goloroden / lottery.lisp
Last active August 29, 2015 14:02
My first 'real' Lisp program…
(defun lottery ()
(flet ((shuffle (list)
(let ((len (length list)))
(loop repeat len
do
(rotatef
(nth (random len) list)
(nth (random len) list))
finally
(return list)))))
(defparameter *is-logged-in* nil)
(defparameter *users* '((golo secret)
(jones anothersecret)))
(defun user-by-login (login)
(assoc login *users*))
(defun password-of (user)
(cadr user))
script(id='BoardListTemplate', type='text/x-jQuery-tmpl')
| <p>${Title}</p>
| <ul id="${Id}" class="IterationBoardList">
| <li class="AddNewItem">Add new Item</li>
| {{tmpl(Items) "#BoardListItemTemplate"}}
| </ul>
var middleware = function() {
return function(req, res, next) {
console.log('pre');
next();
console.log('post');
};
};
var connect = require('connect');
var http = require('http');
{
"name": "de.goloroden.www",
"version": "0.0.86",
"engines": {
"node": "0.6.x"
},
"dependencies": {
"express": ">= 2.4.7",
"stylus": ">= 0.0.1",
"jade": ">= 0.0.1",
golo@Eisbaer:~/Projekte/de.goloroden.www/website$ jitsu logs
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command logs app
info: Authenticated as goloroden
data: 2012-01-15T01:29:59.202Z: drone:stderr:Warning: connection.session() MemoryStore is not
data: 2012-01-15T01:29:59.202Z: designed for a production environment, as it will leak
data: 2012-01-15T01:29:59.202Z: memory, and obviously only work within a single process.
data: 2012-01-15T01:29:59.281Z: drone:stderr:
data: 2012-01-15T01:29:59.306Z: drone:stderr:node.js:201
golo@Eisbaer:~/Projekte/de.goloroden.www/website$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Authenticated as goloroden
info: Analyzing your application dependencies in app.js
warn: Creating new snapshot for version 0.0.82
info: Done creating snapshot 0.0.82
info: Updating application de.goloroden.www
info: Activating snapshot 0.0.82 for de.goloroden.www
golo@Eisbaer:~/Projekte/de.goloroden.www/website$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Authenticated as goloroden
info: Analyzing your application dependencies in app.js
warn: No application exists for de.goloroden.www
info: Checking app availability de.goloroden.www
info: Creating app de.goloroden.www
warn: Creating new snapshot for version 0.0.64
golo@Eisbaer:~/Projekte/de.goloroden.core/website$ nano package.json
golo@Eisbaer:~/Projekte/de.goloroden.core/website$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Authenticated as goloroden
info: Analyzing your application dependencies in app.js
warn: Creating new snapshot for version 0.0.24
info: Done creating snapshot 0.0.24
info: Updating application de.goloroden.core