Skip to content

Instantly share code, notes, and snippets.

@umidjons
umidjons / connect-remote-mongo-via-ssh-tunnel.md
Last active December 12, 2022 07:24
Create ssh tunnel and connect to the remote mongo database on command line

Create ssh tunnel and connect to the remote mongo database on command line

Assume followings:

/mykeys/.ssh/prodserver.pem - is a certificate file

umid - is a user name

111.111.111.111 - is a remote host, that mongodb runs

@sindbach
sindbach / groupby_count_aggregation.cs
Created March 30, 2016 09:47
A simple C# script to demo MongoDB aggregation performing group by count.
using System;
using MongoDB.Bson;
using MongoDB.Driver;
using System.Threading.Tasks;
using System.Linq;
/* Where document structure stored in localhost MongoDB : {token:"word"}
*/
namespace Aggregation_01