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 midiConnector = require('midi-launchpad').connect(midiport); | |
// wait for the connector to be ready | |
midiConnector.on("ready",function(launchpad) { | |
launchpad.on("press", function(button){ | |
button.light(launchpad.colors.green.high); | |
}); | |
launchpad.on("release", function(button) { | |
button.light(launchpad.colors.off); | |
}); |
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
# Mac OSX Specific | |
# ---------------- | |
.DS_Store | |
._* | |
.Spotlight-V100 | |
.Trashes | |
# Windows Specific | |
# ---------------- | |
Thumbs.db |
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
{ | |
"requireCapitalizedConstructors": true, | |
"requireMultipleVarDecl": true, | |
"disallowEmptyBlocks": true, | |
"disallowSpaceAfterObjectKeys": true, | |
"requireCommaBeforeLineBreak": true, | |
"requireParenthesesAroundIIFE": true, | |
"disallowKeywords": [ | |
"with" | |
], |
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
//import Minim library | |
import ddf.minim.*; | |
//for displaying the sound's frequency | |
import ddf.minim.analysis.*; | |
Minim minim; | |
//to make it play song files | |
AudioPlayer song; |
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
// 1: how could you rewrite the following to make it shorter? | |
if (foo) { | |
bar.doSomething(el); | |
} else { | |
bar.doSomethingElse(el); | |
} | |
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 Object() { | |
this.runMethod = function(callback) { | |
var data = "world"; | |
callback(data); | |
} | |
} | |
var object = new Object(); |
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
// $product | |
$medias = array(); | |
foreach ($product->medias as $m) { | |
$medias[] = $m->filename; | |
} | |
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(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseIn |
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 become_active = false; | |
var become_txt = $('<div>Waiting for DJ Slot</div>'); | |
become_txt.css('position','fixed').css('bottom',0).css('left',0).css('z-index',9999).css('color','#fff'); | |
$('body').append(become_txt); | |
var _oldhide = $.fn.hide; | |
$.fn.hide = function(speed, callback) { | |
if ($(this).hasClass('become_dj')) { |
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 () { | |
var v = 0, | |
q = [], | |
o = {}, | |
s = {}, | |
A = { | |
"<": "lt", | |
">": "gt", | |
"&": "amp", | |
'"': "quot", |
OlderNewer