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
[...cohortSlugs].reduce((prevPromise, slug) => { | |
let applications; | |
return prevPromise | |
.then((acc) => { | |
applications = acc; | |
return Cohort.findOne({ slug }); | |
}) | |
.then(({ _id: cohort }) => [ | |
...applications, | |
...applicationsFromFirestore |
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
# pull the official mongo docker container | |
docker pull mongo | |
# create network | |
docker network create mongo-cluster | |
# create mongos | |
docker run -d --net mongo-cluster -p 27017:27017 --name mongo-primary mongo mongod --replSet mongo-set --port 27017 | |
docker run -d --net mongo-cluster -p 27018:27018 --name mongo-secondary mongo mongod --replSet mongo-set --port 27018 |
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 people = [ | |
{ | |
name: 'Ráulingg Robin alphabetically', | |
age: 30 | |
}, | |
{ | |
name: 'rolandó' | |
}, | |
{ | |
name: 'Rolandó' |
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 formatDollarsToCents = function(value) { | |
value = (value + '').replace(/[^\d.-]/g, ''); | |
if (value && value.includes('.')) { | |
value = value.substring(0, value.indexOf('.') + 3); | |
} | |
return !isNaN(value) ? Math.round(parseFloat(value) * 100) : 0; | |
} | |
var formatCentsToDollars = function(value) { |
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
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": 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
select | |
id, name | |
from | |
courses | |
where | |
name like "%Gabriel%" | |
or (JSON_EXTRACT(lessons, "$[*].name") like "%Gabriel%") | |
or (JSON_EXTRACT(lessons, "$[*].subjects[*].name") like "%Gabriel%"); |
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
@setup | |
if (! in_array($env, ['staging', 'production'])) { | |
throw new Exception('--env must be "staging" or "production"'); | |
} | |
$uppecaserEnv = strtoupper($env); | |
try { | |
require __DIR__ . '/vendor/autoload.php'; |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
{"lastUpload":"2021-09-18T15:44:04.716Z","extensionVersion":"v3.4.3"} |
NewerOlder