This file contains hidden or 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
{"lastUpload":"2019-10-09T10:10:53.626Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root_password |
This file contains hidden or 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 maskify(input) { | |
return input.replace(/.(?=.{4})/g, "#"); | |
} | |
/** _Tests__ **/ | |
let assert = require('chai').assert | |
require('mocha').describe; | |
require('mocha').it; |
This file contains hidden or 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 splitInteger = function(num, parts) { | |
const remainder = num % parts | |
const value = (num - remainder) / parts | |
return Array(parts).fill(value).fill(value + 1, 0, remainder); | |
} | |
console.log(splitInteger(25,5)) | |
// Input: X = 25, N = 5 |
This file contains hidden or 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
/** Vercel they provide some environment variables you could use to get the latest Git SHA: */ | |
const COMMIT_SHA = | |
VERCEL_GITHUB_COMMIT_SHA || | |
VERCEL_GITLAB_COMMIT_SHA || | |
VERCEL_BITBUCKET_COMMIT_SHA | |
/** Otherwise you'd need to get it yourself */ |
This file contains hidden or 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 fs = require('fs'); | |
fs.readdirSync('.').forEach(file => { | |
console.log(file); | |
}); |
This file contains hidden or 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 parseTime( | |
time: number | |
): { hours: number; minutes: number; seconds: number; milliseconds: number } { | |
const date = new Date(time); | |
const hours = date.getHours() + date.getTimezoneOffset() / 60 - 24; | |
const minutes = date.getMinutes(); | |
const seconds = date.getSeconds(); | |
const milliseconds = date.getMilliseconds(); | |
return { | |
hours, |
This file contains hidden or 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
version: "3" | |
services: | |
mongo1: | |
hostname: mongo1 | |
container_name: localmongo1 | |
image: mongo:4.0-xenial | |
expose: | |
- 27017 | |
ports: | |
- 27011:27017 |
This file contains hidden or 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
version: "3" | |
services: | |
mongo1: | |
hostname: mongo1 | |
container_name: mongo1 | |
image: mongo:5.0.6 | |
expose: | |
- 27017 | |
ports: | |
- 27011:27017 |
This file contains hidden or 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 timeCalc(millis) { | |
var minutes = Math.floor(millis / 60000) | |
var seconds = parseInt(((millis % 60000) / 1000).toFixed(0)) | |
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds | |
} | |
let start = new Date().getTime() | |
/** operation .... */ |
OlderNewer