Skip to content

Instantly share code, notes, and snippets.

ryanbuening / Example.cs
Created June 24, 2022 01:03 — forked from ImsMoon/Example.cs
Mongo C# Driver CRUD CheatSheet
View Example.cs
var collection = db.GetCollection<BsonDocument>("people");
var builder = Builders<BsonDocument>.Filter;
//Note that the '&' '!' '|' operators are overloaded when used in the FilterBuilder
var filter = builder.Lt("Age", 33) & !builder.Eq("Name", "Ericsson");
var list = await collection.Find(filter).ToListAsync();
View .editorconfig
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
# Indentation and spacing
indent_style = tab
# New line preferences
View gist:5ab3920053e9abe99956a10455d4df7b
public class Result
public bool Success { get; private set; }
public string Error { get; private set; }
public bool Failure
get { return !Success; }
ryanbuening / Hotkeys.ahk
Created May 19, 2021 14:11
AutoHotKey Script
View Hotkeys.ahk
; #NoEnv is recommended for performance and compatibility with future AutoHotkey releases.
; Enable #Warn to assist with detecting common errors.
; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
; Ensures a consistent starting directory.