How to create a previously non-existing mongo database and new user from the nodejs mongodb driver using the admin account.
- Connect as admin user to new database, using
authSource: admin(assumingadminDbName === admin) - Create new user
How to create a previously non-existing mongo database and new user from the nodejs mongodb driver using the admin account.
authSource: admin (assuming adminDbName === admin)| const AWS = require('aws-sdk'); | |
| const fs = require('fs') | |
| const s3download = (bucketName, keyName, localDest) => { | |
| if (typeof localDest == 'undefined') { | |
| localDest = keyName; | |
| } | |
| let params = { |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
| SCHEMADIR="$DIR/../src/libcommon/dbschema" | |
| TARGET_SERVER="http://localhost:9595/api/parse" | |
| APPLICATION_ID="" | |
| MASTER_KEY="" | |
| bind | split-window -h -c "#{pane_current_path}" | |
| bind - split-window -v -c "#{pane_current_path}" | |
| bind r source-file ~/.tmux.conf \; | |
| #set -g default-terminal "screen-256color" | |
| set -g history-limit 10000 | |
| #set-window-option -g utf8 on | |
| set -g utf8 | |
| set -sg escape-time 1 |
| #! /usr/bin/env python | |
| # | |
| # Requires envoy: | |
| # https://github.com/kennethreitz/envoy | |
| import envoy | |
| class BashColors: | |
| HEADER = '\033[95m' | |
| OKBLUE = '\033[94m' |
| import math | |
| class Log: | |
| def __init__(self, hours_estimate=0, file_path=None): | |
| self.hours_estimate = hours_estimate | |
| self.items = [] | |
| self.discussion = "Don't forget a 100+ word discussion!" | |
| if file_path is not None: |
| <?php | |
| class Ftp { | |
| private $conn, $current_dir; | |
| public $log; | |
| public function __construct($host, $username, $password, $passive = false) { | |
| $this->log = new Log; | |
| $this->connect($host, $username, $password, $passive); | |
| } |