Skip to content

Instantly share code, notes, and snippets.

@wiky
wiky / build.md
Created November 4, 2014 09:36
build nodegit for node-webkit
# Fetch this project.
git clone git://github.com/tbranyen/nodegit.git

# Enter the repository.
cd nodegit

# Installs the template engine, run the code generation script, and build.
npm install
@wiky
wiky / build
Created December 25, 2014 02:15
nw-gyp clean configure build --arch=x64 --target=0.10.5
@wiky
wiky / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wiky
wiky / promise.js
Last active February 1, 2016 11:00
function Promise() {
this._callbacks = [];
}
Promise.prototype.then = function(func, context) {
var p;
if (this._isdone) {
p = func.apply(context, this.result);
} else {
p = new Promise();
@wiky
wiky / events.js
Last active October 8, 2016 09:55
/**
* Custom Event
*
* @example
* <pre>
* function Foo() {}
* Foo.prototype.render = function() {
* this.trigger('rendered');
* };
* Events.mixin(Foo);