If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"
npm adduser
var MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect('mongodb://localhost:27017/course', function(err, db) { | |
if(err) throw err; | |
for (var i = 0; i<10; i++) { | |
var fields = ["Engineering", "Medicine", "Marketing"]; | |
var langs = ["EN", "POR", "ES"]; |
Set-ExecutionPolicy RemoteSigned | |
$mongoDbPath = "C:\MongoDB" | |
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
$url = "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.4.zip" | |
$zipFile = "$mongoDbPath\mongo.zip" | |
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.6.4" | |
if ((Test-Path -path $mongoDbPath) -eq $True) | |
{ |
////////////////////////////// | |
// Playing with MongoDB ///// | |
// 1 - Inserting documents / | |
/////////////////////////// | |
// MongoDB Driver module. | |
var MongoClient = require('mongodb').MongoClient | |
// Set the name of the database you want to connect with. |
///////////////////////////// | |
// Playing with MongoDB //// | |
// 2 - Finding documents // | |
////////////////////////// | |
// MongoDB Driver instances. | |
var MongoClient = require('mongodb').MongoClient | |
, ObjectId = require('mongodb').ObjectID |
// File System node module. | |
var fs = require('fs'); | |
// Amazon SDK node module. | |
var AWS = require('aws-sdk'); | |
// Read a file in the project folder that contains your AWS credentials. | |
// On a production server, you would want to reference the credentials using environmental variables. |
///////////////////////////// | |
/// Playing with MongoDB /// | |
// 3 - Updating documents / | |
////////////////////////// | |
// MongoDB Driver instance. | |
var MongoClient = require('mongodb').MongoClient | |
// Set the database and collection name you want to connect to perform the update. |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/ayu/ayu-dark.tmTheme", | |
"font_options": | |
[ | |
"gray_antialias" | |
], | |
"font_size": 11, | |
"ignored_packages": |
window.addEventListener('scroll', () => { | |
if (window.scrollY === document.body.scrollHeight - window.innerHeight) { | |
// Do something | |
} | |
} | |
# Un ejemplo genérico. | |
firebase functions:config:set variable.key="ab1cde234def567890abcde12345f" variable.id="VARIABLE" | |
# Un ejemplo no tan genérico. | |
firebase functions:config:set bitly.key="ab1cde234def567890abcde12345f" bitly.id="BITLY" | |
# Otro ejemplo no tan genérico. Noten como el parámetro 'id' puede ser diferente. | |
firebase functions:config:set instagram.key="ab1cde234def567890abcde12345f" instagram.id="IG_TOKEN" |