This file contains hidden or 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
| /** | |
| * Overwrites default Mousetrap.bind method to optionally accept | |
| * an object to bind multiple key events in a single call | |
| * | |
| * You can pass it in like: | |
| * | |
| * Mousetrap.bind({ | |
| * 'a': function() { console.log('a'); }, | |
| * 'b': function() { console.log('b'); } | |
| * }); |
This file contains hidden or 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
| class Point | |
| constructor: (@x = 0, @y = 0) -> | |
| if isNaN(@x) or isNaN(@y) | |
| throw new Error('Invalid coords') | |
| add: (point) -> | |
| @x += point.x | |
| @y += point.y | |
| subtract: (point) -> |
This file contains hidden or 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() { | |
| function convertScale(x, min, max, min2, max2) { | |
| var distance, percent; | |
| distance = max - min; | |
| percent = (x - min) / distance * 100; | |
| percent = percent > 0 ? percent : -percent; | |
| distance = max2 - min2; | |
| return distance * percent / 100; | |
| }; | |
| )(); |
This file contains hidden or 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
| vibrantmedia.com | |
| tynt.com | |
| intellitxt.com | |
| snap.com | |
| kontera.com | |
| AdGardener.com | |
| apture.com | |
| wibiya.com | |
| doubleclick.net | |
| getconnected.southwestwi-fi.com |
This file contains hidden or 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
| // based off of https://gist.github.com/creationix/5544019 | |
| // these could probably be condensed more, but I'm just doing this | |
| // quickly | |
| exports = module.exports = run; | |
| exports.call = call; | |
| exports.invoke = invoke; | |
| exports.bind = bind; |
This file contains hidden or 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 content_types = [ | |
| 'application/atom+xml', | |
| 'application/ecmascript', | |
| 'application/EDI-X12', | |
| 'application/EDIFACT', | |
| 'application/json', | |
| 'application/javascript', | |
| 'application/octet-stream', | |
| 'application/ogg', | |
| 'application/pdf', |
This file contains hidden or 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
| acko.net | |
| biolitestove.com | |
| cheezburger.com | |
| dust514.com | |
| expressjs.com | |
| flickr.com | |
| github.com | |
| humblebundle.com | |
| icloud.com | |
| jquery.com |
This file contains hidden or 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
| /* | |
| * @author "graphxdziner" on board.flashkit.com | |
| * Source: http://board.flashkit.com/board/showthread.php?728847-convert-hex-value-to-colormatrix-array&s=a432383a54d4eeed74bf800b22ee0f83&p=3854541&viewfull=1#post3854541 | |
| */ | |
| function setColor(mc, r, g, b, a) | |
| { | |
| var matrix = | |
| [ r, 0, 0, 0 | |
| , 0, g, 0, 0 |
This file contains hidden or 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 Other(args) { | |
| Original.call(this, args); | |
| }; | |
| inherits(Other, Original); | |
| // Yes, I know they are not actually "classes" | |
| Other.prototype.classMethod = function() { | |
| // called like so: | |
| // var other = New Other() | |
| // other.classMethod() |
OlderNewer