In the external tools configuration, set the items included below:
coffeelint:
npm install -g coffeelintexternal tools:
name:
| [ { "val": 0, "name": "Acoustic Grand Piano", "group": "Piano"} | |
| , { "val": 1, "name": "Bright Acoustic Piano", "group": "Piano"} | |
| , { "val": 2, "name": "Electric Grand Piano", "group": "Piano"} | |
| , { "val": 3, "name": "Honky-tonk Piano", "group": "Piano"} | |
| , { "val": 4, "name": "Electric Piano 1", "group": "Piano"} | |
| , { "val": 5, "name": "Electric Piano 2", "group": "Piano"} | |
| , { "val": 6, "name": "Harpsichord", "group": "Piano"} | |
| , { "val": 7, "name": "Clavinet", "group": "Piano"} | |
| , { "val": 8, "name": "Celesta", "group": "Chromatic Percussion"} |
| var functionToBlob = function (fn) { | |
| return new Blob([fn.toString()], {type: 'text/javascript'}); | |
| }; |
| /* you should eventually call window.URL.revokeObjectURL(result) on this result */ | |
| var functionToUrl = function (fn) { | |
| return window.URL.createObjectURL(new Blob([fn.toString()], {type: 'text/javascript'})); | |
| }; |
| /*global db, printjson */ | |
| (function () { | |
| var numRecords = 1000, maxValue = 1000, i, keys = 'abcdefghijklmnopqrstuvwxyz'.split(''), | |
| randomBetween, randomSubarray, generateObject, | |
| resultStats, resultSizeInfo; | |
| /* i was lazy: http://stackoverflow.com/questions/4959975/generate-random-value-between-two-numbers-in-javascript */ | |
| randomBetween = function (from, to) { | |
| return Math.floor(Math.random()*(to-from+1)+from); | |
| }; |
| /* does not traverse input object, only reports top-level keys */ | |
| var getKeysByType = function (input) { | |
| var key, item, type, | |
| keys = {}, | |
| getType = function (obj) { | |
| return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1]; | |
| }; | |
| // loop through input, populating a hash of types | |
| for (key in input) { | |
| item = input[key]; |
| // create a worker that simply echoes messages sent to it | |
| var worker = new Worker(window.URL.createObjectURL(new Blob(["self.addEventListener('message',function(e){self.postMessage(e.data);},false);"]))); | |
| // listen for messages from worker | |
| worker.addEventListener('message', function (event) { | |
| console.log('From Worker:'); | |
| console.dir(event); | |
| }, false); | |
| // post a test message |
In the external tools configuration, set the items included below:
coffeelint:
npm install -g coffeelintexternal tools:
name:
| /* | |
| visit http://www.patatap.com/ then run this code in your | |
| console. change the bpm and maxNotes variables | |
| */ | |
| (function (global) { | |
| var bpm = 80, | |
| maxNotes = 5, | |
| interval = (60 * 1000) / bpm, | |
| between = function (min, max) { | |
| return Math.floor(Math.random() * (max - min + 1) + min); |
A list of some other badges: http://shields.io/
| curl https://codeload.github.com/fizerkhan/react-seed/tar.gz/master | tar xvz |