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
/* eslint-disable no-console, no-param-reassign */ | |
/** | |
* Returns a filled in board such that there are no 3 consecutive | |
* jewels (vertically/horizontally) of the same type. | |
* | |
* @param widthOfBoard int which provides width of board | |
* @param heightOfBoard int which provides height of board | |
* @param jewels array providing valid jewels for board | |
*/ |
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
const console = require("console"); | |
(function () { | |
console.log(foo); // undefined | |
{ | |
var foo = 'foo'; | |
} | |
})(); | |
(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 isArrayPalindrome (array) { | |
const forward = [...array].join(); | |
const reversed = [...array].reverse().join(); | |
if (reversed == forward) { | |
return true; | |
} | |
return false; | |
} | |
const getArraySansIndex = (a, _index) => a.filter((item, index) => index !== _index); |
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
#!/usr/bin/env node | |
const argv = require('yargs-parser')(process.argv.slice(2)); | |
function getEnvVarForScopeVConfigKey(keyName) { | |
const {env} = require('process'); | |
return env[`MONOREPO_${keyName.toUpperCase()}`]; | |
} | |
const ScopeVConfiguration = Object.create({ |
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
/* Begin cache-related code */ | |
const sumCache = new Map(); | |
function getCachedSumResult (array, sum) { | |
return sumCache.get(`${array}{${sum}`); | |
} | |
function cacheSumResult (array, sum, result) { | |
sumCache.set(`${array}{${sum}`, result); | |
return result; |
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
const fetch = require('node-fetch'); | |
function classFetch (classId) { | |
return fetch(`https://api.managebac.com/v2/classes/${classId}/students`, { | |
headers: { | |
'auth-token': '{{}}' | |
} | |
}) | |
.then(response => | |
response.json() |
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
> foo = (...s) => `foo${s.join()}` | |
[Function: foo] | |
> bar = (...s) => `${s.join()}bar` | |
[Function: bar] | |
> qux = s => Math.ceil(Number(s)) | |
[Function: qux] | |
> compose(foo, bar, qux)(1.27890) | |
'foo2bar' | |
> fooBarQux = compose(foo, bar, qux) | |
undefined |
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
diff --git a/package.json b/package.json | |
index 40439456..96cd7f13 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -18,7 +18,6 @@ | |
] | |
}, | |
"resolutions": { | |
- "mux.js": "^5.5.1", | |
"@material-ui/icons": "^4.5.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
<!-- Schema.org spec for Google/Bing to display a search bar to users to search our site from within Google --> | |
<!-- See: https://developers.google.com/webmasters/structured-data/slsb-overview --> | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "WebSite", | |
"url": "http://www.showtimeanytime.com", | |
"potentialAction": { | |
"@type": "SearchAction", | |
"target": "http://www.showtimeanytime.com/#search/{search_term_string}", |