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
require('colors'); | |
gulp.task('get-tasks', () => | |
(process.nextTick(() => { | |
console.log('\n_________ALL REGISTERED GULP TASKS_________'); | |
Object.keys(gulp.tasks).forEach((t) => | |
((t === 'install' || t === 'uninstall') ? null : | |
console.log('-- ' + t.bgBlack.green))) | |
console.log('___________________________________________\n'); | |
}))); |
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
#find version of globally installed package | |
alias npmpv="npm list -g | grep" | |
#add new alias to bashrc, also make immediately available | |
function newalias { | |
echo "" >> ~/.bashrc | |
echo "" >> ~/.bashrc | |
echo 'alias' ${1}='"'${2}'"' >> ~/.bashrc | |
$(echo 'alias' ${1}'='${2}) | |
} |
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
/** | |
* Custom Lodash functions for transforming http GET requests | |
*/ | |
_.mixin({ | |
//Shifts an item in an array from one location in an array to another | |
move: function (array, fromIndex, toIndex) { | |
array.splice(toIndex, 0, array.splice(fromIndex, 1)[0] ); | |
return array; | |
}, |
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
//Comprehensive check for whether or not a Javascript variable has actual content | |
var hasContent = function(input) { | |
if (typeof input === 'number') { | |
if (isNaN(input)) { | |
return false; | |
}; | |
} else { | |
if (input === 0) { | |
return false; | |
} |
NewerOlder