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
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// checks play time | |
var checkTimeInterval = 500; | |
setInterval(function detectVideoPlay() { | |
try { | |
var player = $('embed', $el)[0]; | |
if (player.getSettings().playTime > Number($el.data('duration'))) { | |
pause(element); | |
} | |
} catch(e) { } | |
}, checkTimeInterval); |
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
#!/bin/bash | |
shopt -s expand_aliases | |
source ~/.bash_profile; | |
PROJ_ROOT='~/dev/minuscode/dev/gitescrow/proj' | |
cd $PROJ_ROOT; | |
gco develop; |
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
/* | |
* NAME | |
* | |
* statistics-distributions.js - JavaScript library for calculating | |
* critical values and upper probabilities of common statistical | |
* distributions | |
* | |
* SYNOPSIS | |
* | |
* |
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 partition ( list, prop, begin, end, pivot ) { | |
var piv = list[pivot]; | |
swap (list, pivot, end-1 ); | |
var store = begin; | |
var ix; | |
for ( ix = begin; ix < end - 1; ++ix ) { | |
if ( list[ix][prop] <= piv[prop] ) { | |
swap (list, store, ix ); | |
++store; | |
} |
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 cleanObject - Cleans javascript objects recursively (removes and promotes [parent = child] properties) | |
@param {Object} obj - Object to be clean | |
@param {Array} toRemove - array composed by the property names to be removed | |
@param {Array} toPromote - array composed by the property names to be promoted to the parent's value | |
*/ | |
function cleanObject(dirtyObj, toRemove, toPromote) { | |
var obj = JSON.parse(JSON.stringify(dirtyObj)); | |
var itemsObj; | |
var o; |