Skip to content

Instantly share code, notes, and snippets.

View neonstalwart's full-sized avatar

Ben Hockey neonstalwart

  • google.com
  • Boulder, CO
View GitHub Profile
@neonstalwart
neonstalwart / dylan.profile.js
Created May 30, 2012 21:26 — forked from dylans/dylan.profile.js
Build profile draft
function copyOnly(mid) {
return (/test/.test(mid) && mid !== 'dgrid/test/data/perf') || mid in {
// There are no modules right now in dojo boilerplate that are copy-only. If you have some, though, just add
// them here like this:
// 'app/module': 1
};
}
var profile = {
basePath: './',
@neonstalwart
neonstalwart / wrapperStore
Created August 18, 2011 16:48 — forked from dmachi/wrapperStore
getting started with wrapping two stores with one
var store = function(substores,options){
return {
query: function(query, options){
return when(promise.all(substores.map(function (store) {
return when(store.query(query, options));
}), function (results) {
return results.reduce(function (out, arr) {
return out.concat(arr);
}, []);
@neonstalwart
neonstalwart / define-node.js
Created April 22, 2011 13:46 — forked from kriszyp/define-node.js
Add AMD/define() support to NodeJS
// Credit: this is derived from a combination of
// - https://gist.github.com/650000
// - https://github.com/joyent/node/pull/350
// - https://github.com/ajaxorg/cloud9/blob/master/support/requireJS-node.js
var path = require('path'),
fs = require('fs'),
defaultCompile = module.constructor.prototype._compile,
defaultResolveFilename = module.constructor._resolveFilename,
// this gives the main module a chance to use define iff it does so before any other module
<!DOCTYPE HTML>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Promise</title>
<script src="http://o.aolcdn.com/dojo/1.4/dojo/dojo.xd.js">
</script>
<script type="text/javascript">
dojo.provide("dojox.Promise");