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
for (var key = 0, value; value = someArray[key++];) { | |
// value is already defined by for loop | |
console.log('index: ' + key, 'value: ' + value); | |
} |
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(){ | |
this.Terminal = function(container, steps){ | |
this.container = document.getElementById(container); | |
this.steps = steps; | |
this.cycle = this.cycle.bind(this); | |
this.cycle(); | |
}; | |
this.Terminal.prototype.cycle = function(){ |
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 BinaryHeap(scoreFunction){ | |
this.content = []; | |
this.scoreFunction = scoreFunction; | |
} | |
BinaryHeap.prototype = { | |
push: function(element) { | |
this.content.push(element); | |
this.bubbleUp(this.content.length - 1); |
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
/** | |
* @author Mat Groves http://matgroves.com/ @Doormat23 | |
*/ | |
/** | |
* This inverts your Display Objects colors. | |
* | |
* @class InvertFilter | |
* @extends AbstractFilter | |
* @constructor |
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
img[src$=".gif"], | |
img[src$=".png"] { | |
image-rendering: -moz-crisp-edges; /* Firefox */ | |
image-rendering: -o-crisp-edges; /* Opera */ | |
image-rendering: -webkit-optimize-contrast;/* Webkit (non-standard naming) */ | |
image-rendering: crisp-edges; | |
-ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ | |
} |
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 quickSplice = function quickSplice(arr, index){ | |
var len = arr.length; | |
if (len) { | |
while (index < len){ | |
arr[index++] = arr[index]; | |
} | |
--arr.length; | |
} | |
}; |
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
<html> | |
<head> | |
<title>Learning WebGL — lesson 3</title> | |
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | |
<script type="text/javascript" src="glMatrix-0.9.5.min.js"></script> | |
<script type="text/javascript" src="webgl-utils.js"></script> | |
<script id="shader-fs" type="x-shader/x-fragment"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Events Example</title> | |
<meta name="viewport" content="width=device-width,user-scalable=no"> | |
<style type="text/css"> | |
html, body { | |
-webkit-tap-highlight-color:transparent; | |
-moz-tap-highlight-color:transparent; | |
-ms-tap-highlight-color:transparent; |
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
let g:ctrlp_working_path_mode = 0 | |
let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:20,results:20' | |
let g:ctrlp_cache_dir = $HOME.'/.vim/cache/ctrlp' | |
let g:ctrlp_switch_buffer = 'e' | |
let g:ctrlp_open_new_file = 'r' | |
let g:ctrlp_clear_cache_on_exit = 0 | |
let g:ctrlp_max_files = 10000 | |
let ctrlp_filter_greps = "". |
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
" FIXME: Set these 2 lines to your preferred liking | |
let g:detectindent_preferred_expandtab = 0 | |
let g:detectindent_preferred_indent = 4 | |
let g:detectindent_max_lines_to_analyse = 1024 | |
augroup detectindent | |
autocmd! | |
autocmd BufReadPost * :DetectIndent | |
augroup END |
OlderNewer