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
save-exact=true | |
save=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
image: node:9-alpine | |
stages: | |
- lint_test | |
- build | |
lint_test: | |
stage: lint_test | |
before_script: | |
- echo //registry.npmjs.org/:_authToken=$SYNGENTA_NPM_TOKEN >> ~/.npmrc |
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
image: node:9-alpine | |
stages: | |
- lint_test | |
- build | |
lint_test: | |
stage: lint_test | |
before_script: | |
- echo registry=https://nexus.growerhub.io/repository/npm-group/ >> ~/.npmrc |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/narendrasisodiya/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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 sh | |
echo "====== Running After Build Scripts ========" | |
echo "0. === moving public to build ===" | |
mv public build | |
echo "1. === Copy index.html to 200.html ===" | |
cp build/index.html build/200.html | |
echo -e "Copied\n\n\n" |
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
# virtualbox | |
Install from https://www.virtualbox.org/wiki/Downloads | |
# kubernetes-cli | |
brew install kubernetes-cli | |
# minikube | |
brew cask install minikube | |
minikube start |
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 convertTimeStampToTime(timeStamp) { | |
let date = new Date(timeStamp); | |
let hours = date.getHours(); | |
let minutes = date.getMinutes(); | |
if (`${hours}:${minutes}` === '12:0') { | |
return '12:00 Noon'; | |
} | |
if (`${hours}:${minutes}` === '0:0') { | |
return '12:00 MidNight'; | |
} |
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
Array.prototype.asyncMapPool = async function(n, t) { | |
var r = [], | |
i = this.map(() => !1), | |
o = this.length, | |
e = this; | |
return new Promise(function(a, s) { | |
function f() { | |
if (h < o) { | |
var t = h; | |
r.push( |
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
var moment = require("moment-timezone"); | |
function getStartEndTimestampsonGivenTimezone(dateStr, timeZone) { | |
var endDateStr = moment(dateStr) | |
.add(1, "days") | |
.format("YYYY-MM-DD"); | |
return { | |
startTimeStamp: parseInt(moment.tz(dateStr, timeZone).format("x"), 10), | |
endTimeStamp: parseInt(moment.tz(endDateStr, timeZone).format("x"), 10) - 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
var getTime = (function() { | |
var startTime = Date.now(); | |
return function() { | |
return (Date.now() - startTime) / 1000; | |
}; | |
})(); | |
Array.prototype.asyncMapP = function(callback) { | |
return Promise.all(this.map(callback)); | |
}; | |
Array.prototype.asyncMapS = async function(callback) { |