View SassMeister-input-HTML.html
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> |
View listenTo.js
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 |
View typeHelpers
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, |
View MarkerCollections.html
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; |
View MarkerCollection-amd.js
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', |
View tsd-amd Grunt Task
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({ |
View drag-drop.css
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; | |
} |
View assert-ext.js
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') | |
}); |
View promise-series
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) => { |
View cluster.js
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