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
| { | |
| "auto_complete": true, | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", |
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 object = undefined | |
| , minimum = undefined | |
| , count = 0 | |
| , limit = 0 | |
| , skip = 5 | |
| , interval = undefined; | |
| function expand(width) { | |
| object = document.getElementById('super'); | |
| minimum = object.offsetWidth; |
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
| // example 1: format "Days" : days, "Hours" : hours, "Minutes" : minutes, "Seconds" : seconds | |
| millisToTime = function(ms) { | |
| x = ms / 1000; | |
| seconds = Math.round(x % 60); | |
| x /= 60; | |
| minutes = Math.round(x % 60); | |
| x /= 60; | |
| hours = Math.round(x % 24); | |
| x /= 24; | |
| days = Math.round(x); |
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
| /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyhd YOUR_HARD_DISK.vdi –resize SIZE_IN_MB |
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 jq = document.createElement('script'); | |
| jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| jQuery.noConflict(); |
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
| split = (array, numberOf) -> | |
| matrix = [] | |
| indice = 0 | |
| aux = -1 | |
| while indice < array.length | |
| if indice % numberOf is 0 | |
| aux++ | |
| matrix[aux] = [] | |
| matrix[aux].push array[indice] |
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
| window.scaler = function(options) { | |
| var a, ab, b, c, cd, d, e, f, scale; | |
| a = options.srcWidth; | |
| b = options.srcHeight; | |
| c = options.windowWidth; | |
| d = options.windowHeight; | |
| console.log(c, d); | |
| ab = a / b; | |
| cd = c / b; | |
| e = 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
| SELECT STRAIGHT_JOIN categories.id, categories.title, categories.game_count, categories.display_order FROM `categories` INNER JOIN `category_namespaces` ON `category_namespaces`.`category_id` = `categories`.`id` WHERE `categories`.`type` IN ('ClickJogos::GameCategory') AND `categories`.`published` = 1 AND (category_namespaces.namespace = 'jgo') ORDER BY | |
| CASE | |
| WHEN categories.id LIKE '447%' THEN 1 | |
| WHEN categories.id LIKE '448%' THEN 2 | |
| ELSE 3 | |
| END, categories.game_count DESC; |
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
| do (Backbone) -> | |
| method = | |
| cacheOrFetch: (options={}) -> | |
| @_cache ?= @fetch(options) | |
| _.extend(Backbone.Collection.prototype, method) |
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
| Array.prototype.toSentence = -> | |
| wordsConnector = ', ' | |
| lastWordConnector = ' e ' | |
| sentence = undefined | |
| switch @length | |
| when 0 | |
| sentence = '' | |
| when 1 | |
| sentence = @[0] |
OlderNewer