Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Hayes joeyred

View GitHub Profile
@joeyred
joeyred / debug.js
Created Nov 30, 2016
A little debugging object.
View debug.js
/**
* Controls whether debug functions have any output to console.
* @type {Boolean}
*/
var DEBUG_IS_ENABLED = true;
/**
* Debug constructor
* @method Debug
* @param {string} objectName The name of the parent object of all logged data
@joeyred
joeyred / gulpfile.js
Last active Dec 13, 2016
Use Jekyll with gulp.js while leveraging the use of a `--production` flag when running `gulp` to set the environment in Jekyll to production as well.
View gulpfile.js
var gulp = require('gulp');
var yargs = require('yargs');
var DEPLOY = Boolean(yargs.argv.production);
/**
* Jekyll Task
*
* Make Jekyll run stuff when told to by gulp.
*
View package.json
{
"property": [
"hello"
]
}
View arraysMatch.js
function arraysMatch(arrayOne, arrayTwo) {
let match = false;
if (arrayOne.length !== arrayTwo.length) {
return false;
}
for (let indexOne = 0; indexOne < arrayOne.length; indexOne += 1) {
// For checking for a match to the current ArrayOne value
let valueMatch = false;
for (let indexTwo = 0; indexTwo < arrayTwo.length; indexTwo += 1) {
You can’t perform that action at this time.