Skip to content

Instantly share code, notes, and snippets.

View sergi's full-sized avatar
🎯
Focusing

Sergi Mansilla sergi

🎯
Focusing
View GitHub Profile
// Accumulators
// =============================================================================
//
// A tiny library for reactive programming that offers blazing fast generic
// collection manipulation, asyncronous flow control and the ability to
// represent infinitely large collections.
//
// Copyright Gordon Brander, 2013. Released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
//
// Background:
// Accumulators
// =============================================================================
//
// A tiny library for reactive programming that offers blazing fast generic
// collection manipulation, asyncronous flow control and the ability to
// represent infinitely large collections.
//
// Copyright Gordon Brander, 2013. Released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
//
// Background:
@sergi
sergi / stack.go
Last active December 10, 2015 11:48 — forked from bemasher/stack.go
package main
import (
"fmt"
)
type Stack struct {
top *Element
size int
}
@sergi
sergi / javascript_background_thread.js
Created September 25, 2012 12:24 — forked from jameswomack/javascript_background_thread.js
Extend function prototype to run a function as a WebWorker
Function.prototype.runOnBackgroundThread = function (aCallback) {
var _blob = new Blob(['onmessage = '+this.toString()],{"type":"text/javascript"});
var _worker = new Worker((webkitURL.createObjectURL || URL.createObjectURL)(_blob));
_worker.onmessage = aCallback;
_worker.postMessage();
}
var _test = function () {
postMessage((1+1).toString());
}
@sergi
sergi / example.js
Created October 27, 2009 20:40 — forked from Gozala/README.md
exports.example = function(a, b) {
['This is a function foo which is supposed to do something.\n\
But the best thing is that it has nice documentation in it.\
@param {String} a first argument\
@param {String} b second argument\
@returns {String} Concatinated string literal']
return [a, b].join(" ");
};
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users