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
<a class="closeBtn">.closeBtn</a> | |
<div class="acme-app"> | |
<a class="closeBtn">.acme-app .closeBtn</a> | |
</div> | |
<div class="acme-app"> | |
<div class="reset"> | |
<a class="closeBtn">.acme-app .reset .closeBtn</a> | |
</div> |
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([ | |
'vendor/underscore', | |
'when' | |
], function(_, when) { | |
/** | |
* Helper class for | |
* the listenTo facet. | |
* | |
* @param proxy |
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
var NATIVES = { | |
'Array': 1, | |
'Boolean': 1, | |
'Date': 1, | |
'decodeURI': 1, | |
'decodeURIComponent': 1, | |
'encodeURI': 1, | |
'encodeURIComponent': 1, | |
'eval': 1, | |
'Error': 1, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Aeris.js MarkerCollection example</title> | |
<style type="text/css"> | |
html, body { | |
width: 100%; | |
height: 100%; | |
margin: 0; |
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
require.config({ | |
paths: { | |
aeris: 'bower_components/aerisjs/src', | |
// Aeris.js dependencies | |
underscore: 'bower_components/underscore/underscore', | |
jquery: 'bower_components/jquery/jquery', | |
backbone: 'bower_components/backbone/backbone', | |
leaflet: '//cdn.leafletjs.com/leaflet-0.7.2/leaflet-src', | |
'leaflet-markercluster': 'bower_components/leaflet.markercluster/dist/leaflet.markercluster-src', |
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
module.exports = function(grunt) { | |
var path = require('path'); | |
grunt.registerMultiTask( | |
'tsd-amd', | |
'Generates a TypeScript definition file for a set of *.ts files. ' + | |
'The output will contain declared modules for every *.ts file, ' + | |
'which are named according to their AMD ids.', | |
function() { | |
var options = this.options({ |
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
/* Prevent the text contents of draggable elements from being selectable. */ | |
[draggable] { | |
-moz-user-select: none; | |
-khtml-user-select: none; | |
-webkit-user-select: none; | |
user-select: none; | |
/* Required to make elements draggable in old WebKit */ | |
-khtml-user-drag: element; | |
-webkit-user-drag: element; | |
} |
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
const assert = require('assert'); | |
// Wrap `assert()` | |
const assertExt = (val, msg) => assert(val, msg); | |
// Extend assert properties | |
Object.assign(assertExt, assert, { | |
someCustomAssertion: require('./assert/some-custom-assertion') | |
}); |
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
const _ = require('lodash'); | |
function series(count, asyncFn) { | |
return _.range(0, count) | |
.reduce((lastRun_, i) => { | |
return lastRun_.then(() => asyncFn(i)) | |
}, Promise.resolve()); | |
} | |
series(10, (i) => { |
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
#!/usr/bin/env node | |
/** | |
* Usage: | |
* | |
* node cluster.js ./worker-script.js | |
*/ | |
const cluster = require('cluster'); | |
const path = require('path'); | |
function startCluster(runWorker, opts) { |
OlderNewer