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 _fetch = Backbone.Collection.prototype.fetch; | |
var _reset = Backbone.Collection.prototype.reset; | |
_.extend(Backbone.Collection.prototype, { | |
fetching: false | |
}); | |
Backbone.Collection.prototype.fetch = function(options) { | |
this.fetching = true; |
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 proxied = window.XMLHttpRequest.prototype.open; | |
window.XMLHttpRequest.prototype.open = function() { | |
console.log( arguments ); | |
return proxied.apply(this, [].slice.call(arguments)); | |
}; | |
})(); |
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
String.prototype.killWhiteSpace = function() { | |
return this.replace(/\s/g, ''); | |
}; | |
String.prototype.reduceWhiteSpace = function() { | |
return this.replace(/\s+/g, ' '); | |
}; |
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 maxStackSize = function(i){try{(function m(){++i&&m()}())}catch(e){return i}}(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
Array.prototype.erase = function(item) { | |
for( var i = this.length; i--; ) { | |
if( this[i] === item ) { | |
this.splice(i, 1); | |
} | |
} | |
return this; | |
}; |
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
// ig.game.* are global objects being used to store results | |
var findGemBlocks = function () { | |
var connectedGems = [], | |
finalGemBlocks = [], | |
getConnectedGems = function (gem) { | |
if (!_.include(connectedGems, gem)) { | |
connectedGems.push(gem); | |
if (_.include(_.flatten(finalGemBlocks), gem)) return false; |
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
-- Bar class | |
-- LGPL Juan Belón Pérez | |
-- videojuegos.ser3d.es | |
-- 2011 | |
Bar = class() | |
function Bar:init() | |
self.bgems = {} | |
self.time = 0 | |
for i=1,maxGemsRow do |
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 roundNumber(num, dec) { | |
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); | |
return result; | |
} |
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
/* Based on email I got from andrea ricci */ | |
a[href^="mailto:"]:before { content: "\2709"; } | |
.phone:before { content: "\2706"; } | |
.important:before { content: "\27BD"; } | |
blockquote:before { content: "\275D"; } | |
blockquote:after { content: "\275E"; } | |
.alert:before { content: "\26A0"; } | |
:before, :after { |