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 stocksArrayChallenge(arr) { | |
const length = arr.length; | |
const minIndex = arr.reduce((min, cur, i, arr) => cur < arr[min] ? i : min, 0); | |
const maxIndex = arr.reduce((max, cur, i, arr) => cur > arr[max] ? i : max, 0); | |
if (length < 2 || (length == 2 && maxIndex < minIndex) ) { | |
return -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
git rev-list --left-only origin/master...feature_branch | |
# You can add/use flag | |
# --right-only is for "ahead" information | |
# --left-only is for "behind" information | |
# --count to count the number of commits behind or ahead |
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
git ls-files -u |
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
wasMerged1=$(git branch -r --merged ${origin} | grep ${tomerge} | wc -l) | |
wasMerged2=$(git log --oneline ${origin}..${tomerge} 2> /dev/null | wc -l) | |
if [[ "$wasMerged1" -gt 0 && "$wasMerged2" -gt 0 ]]; then | |
echo "It was merged!" | |
fi |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"module": "esnext", | |
"strict": true, | |
"jsx": "preserve", | |
"importHelpers": true, | |
"moduleResolution": "node", | |
"experimentalDecorators": true, | |
"allowJs": true, |
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
module.exports = { | |
configureWebpack: { | |
output: { | |
libraryExport: "default" | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, | |
exclude: /node_modules/, |
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
module.exports = { | |
configureWebpack: { | |
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, | |
exclude: /node_modules/, | |
include: /src/, | |
loader: "ts-loader", | |
options: { |