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
{ | |
"title": "users", | |
"bsonType": "object", | |
"required": [ | |
"id", | |
"name", | |
"email" | |
], | |
"properties": { | |
"id": { |
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 ClientSideFieldLevelEncryptionOptions = { | |
"keyVaultNamespace": "encryption.__keys", | |
"kmsProviders": { | |
"local": { | |
"key": BinData(0, "${encryption_master_key}") | |
} | |
} | |
} | |
var connection = new Mongo( |
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
'use strict' | |
const Mongo = require('mongodb').MongoClient | |
const configuration = require('../configuration/configuration') | |
const mongoUrl = configuration.getMongoDbUrl() | |
const mongoDbName = configuration.getMongoDbName() | |
module.exports = class { |
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
'use strict' | |
const Connector = require('./mongodb-connection') | |
const uuid = require('uuid').v4 | |
const USERS_COLLECTION = "users" | |
module.exports = new class extends Connector { | |
constructor() { |
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
'use strict' | |
const { expect } = require('chai') | |
const users = require('../../../lib/repository/users') | |
describe('Users', () => { | |
after(() => { | |
return users._close() | |
}) | |
describe('.getUser', () => { |
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.1' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
ports: | |
- 27017:27017 | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: user |
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
import json | |
from pathlib import Path | |
import pymongo | |
mongoClient = pymongo.MongoClient( | |
"mongodb://localhost:27017/", username="removed", password="removed") | |
mongoDatabase = mongoClient["twitter"] | |
mongoCollection = mongoDatabase["tweets"] |
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
import pymongo | |
mongoClient = pymongo.MongoClient( | |
"mongodb://localhost:27017/", username="removed", password="removed") | |
mongoDatabase = mongoClient["twitter"] | |
mongoCollection = mongoDatabase["tweets"] | |
def fetch_next_tweet_without_classification(): | |
result = list(mongoCollection.aggregate([ | |
{ |
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
node-html-light | |
node-modules-scan | |
broccoli-plugin-adapter | |
broccoli-test-runner | |
broccoli-livereload | |
broccoli-image-min | |
broccoli-inject-livereload | |
broccoli-version | |
express-cloudfoundry-actuator-middleware | |
generator-stfsy-node |
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 observer = new IntersectionObserver((entries, observer) => { | |
for (const entry of entries) { | |
if (entry.isIntersecting) { | |
// do something after target has become visible on screen | |
} else { | |
// do something after target has been moved off screen | |
} | |
} | |
}, options) |