- Bytes and Blobs by David Flanagan
- Conference Wifi Redux by Malte Ubi
- Sashimi - https://github.com/cramforce/Sashimi
- Run Your JS everywhere with Jellyfish by Adam Christian - http://jelly.io Project
- Fighting Crime and Kicking Apps with Batman.js by Nick Small
- Hello Jo by Dave Balmer - Project - http://joapp.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example #1 : usage example | |
* - Image paths are relative to the HTML file. | |
* - Support absolute paths as well. | |
* - Appending `!bust` to the end of the file name will avoid caching the image. | |
*/ | |
require(['image!lol_cat.gif', 'image!http://tinyurl.com/4ge98jz', 'image!dynamic_image.jpg!bust'], function(cat, awesome, dynamic){ | |
//add loaded images to the document! | |
document.body.appendChild(awesome); | |
document.body.appendChild(cat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone github:lenary/guides.git | |
Cloning into guides... | |
remote: Counting objects: 255, done. | |
remote: Compressing objects: 100% (216/216), done. | |
remote: Total 255 (delta 111), reused 163 (delta 35) | |
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done. | |
Resolving deltas: 100% (111/111), done. | |
$ cd guides | |
$ git remote -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.prototype.then = function (onResolve, onReject, onProgress) { | |
if(isPromise(onResolve)) { | |
// Chain promise | |
this.then( | |
function(val) { onResolve.resolve(onReject ? onReject : val); }, | |
function(err) { onResolve.reject(err); }, | |
function(update) { onResolve.progress(update); } | |
); | |
} else { | |
// capture calls to then() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: Ben Gerrissen | |
* Date: 9-3-11 | |
* License: MIT | |
*/ | |
(function( global ){ | |
var undefined | |
, preloads = false |
A List of actively-supported, reusable, open-source, AMD-compliant modules in the wild. Let me know if you have another module to add to the list!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
function Klass(id){ this._id = id; } | |
Klass.prototype.id = function(){ console.log(this._id); } | |
var freeExports = typeof exports == 'object' && exports; | |
if (freeExports) { | |
for (var prop in Klass) freeExports[prop] = Klass[prop]; | |
} else if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { | |
define(function() { return Klass; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyView.js when concatenated together using cram.js | |
// cram.js needs two new features to make this work: | |
// 1. an option to NOT normalize module ids | |
// 2. an option to more easily exclude modules from the build (wire plugins, for instance) | |
define('./myView/controller', { | |
_onClick: function (e) { | |
this.rootNode.classList.toggle(this.states.selected); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soon = (function() { | |
var enqueueTask; | |
if(typeof process != 'undefined' && typeof process.nextTick == 'function') { | |
// Node nextTick | |
enqueueTask = process.nextTick; | |
} else if (typeof setImmediate == 'function') { | |
// setImmediate for new IE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define({ | |
myFunc: { | |
expr: { | |
body: 'alert(e.target.textContent);', | |
params: ['e'] | |
} | |
}, | |
body: { |
OlderNewer