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
# !/bin/bash | |
pomVersion=`cat pom.xml \ | |
| grep '^ <version>.*</version>$' \ | |
| awk -F'[><]' '{print $3}' \ | |
| sed 's/-SNAPSHOT//'` | |
npmVersion=`cat package.json \ | |
| grep version \ | |
| head -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
# !/bin/bash | |
FILES=`{ git diff --name-only HEAD; \ | |
git ls-files --others --exclude-standard; } \ | |
| grep '\.js$' \ | |
| grep -v '^.*exclude-folder.*$'` | |
node_modules/.bin/eslint $FILES -f table --color --quiet |
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
/** | |
* Angular Hook Module | |
* @module vNode2NgComponent | |
*/ | |
// ============================================================================ | |
// Imports | |
// | |
import R from 'ramda'; | |
import { infernoRender as iRender } from './utils'; |
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
# convert all text files to unix-style | |
* text eol=lf | |
# configure as text files | |
*.css text | |
*.eslintignore text | |
*.eslintrc text | |
*.foreverignore text | |
*.gitattributes text | |
*.gitignore text |
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
/** | |
* Largest Rectangle from Histogram | |
* | |
* function which takes a range of histogram points, | |
* (array of natural numbers [or zero]), and returns the | |
* largest rectangle area that can fit inside of it. | |
* | |
* @param {Array<Number>} points The range of histogram points | |
* @return {Number} The largest rectangle area | |
* |
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
/** | |
* Type for the utility helper | |
* @paramtype T - type of object the utils are designed around | |
*/ | |
export type Utils<T> = { | |
build: (a?: Partial<T>) => T; | |
} & { | |
[K in keyof T as `buildOn${Capitalize<string & K>}`]: (a: T[K]) => T; | |
} & { | |
[K in keyof T as `get${Capitalize<string & K>}`]: (a: Partial<T>) => T[K] | 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
const tilePoints = { | |
a: 10, | |
b: 5, | |
c: 2, | |
t: 1, | |
// TODO - add more tile points for different letters | |
_: 0, | |
}; | |
/** |
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
/** | |
* creates key from coordinates (for mapping) | |
* @param {number} r - row number | |
* @param {number} c - column number | |
* | |
* @returns {string} string key | |
*/ | |
const toKey = (r, c) => `${r}|${c}`; | |
/** |
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 cardinalsMap = new Map([ | |
[0, 'zero'], | |
[1, 'one'], | |
[2, 'two'], | |
[3, 'three'], | |
[4, 'four'], | |
[5, 'five'], | |
[6, 'six'], | |
[7, 'seven'], | |
[8, 'eight'], |
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
/** | |
* Validates if given string matches given pattern | |
* @param {string} s - given string | |
* @param {string} p - given pattern | |
* @return {boolean} string matches pattern | |
*/ | |
function isMatch(s, p) { | |
let sIdx = 0; | |
let pIdx = 0; | |
OlderNewer