Skip to content

Instantly share code, notes, and snippets.

View imravichaudhary's full-sized avatar
🎯
Focusing

Ravi Chaudhary imravichaudhary

🎯
Focusing
View GitHub Profile
@imravichaudhary
imravichaudhary / crypto.js
Last active January 25, 2017 15:28
Encryption and Decryption in Node.js v6.9.4 for buffer data
'use strict'
var crypto = require('crypto')
var Promise = require('bluebird')
module.exports = {
encrypt: encrypt,
decrypt: decrypt
}
'use strict'
/**
* @module guid-service
*/
module.exports = guidService()
/**
* @function guidService Generate GUID
* @return {{function} base64Guid Return the GUID in base64
@imravichaudhary
imravichaudhary / unlock-and-reset-account-in-mongo-ops-manager.md
Last active November 14, 2022 20:54
Unlock and reset account in Mongo Ops Manager when SMTP not set up

To unlock the account in Mongo Ops Manager when smtp not setup

  • Connect the Mongo Ops Manager AppDB using Mongo Shell
  • Run below command
  • use mmsdbconfig
  • db.config.users.update({"un": ""}, {$set: {"isLocked": false, lastPageView: new Date()}})

To reset the account in Mongo Ops Manager when smtp not setup

  • Click on the reset password link from the ops manager login page
@imravichaudhary
imravichaudhary / mongod.conf
Created March 23, 2018 20:50
MongoDB service and configuration
net:
bindIp: 0.0.0.0
port: 27000
processManagement:
fork: "true"
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
security:
authorization: enabled
keyFile: /var/lib/mongodb-mms-automation/keyfile
storage: