Skip to content

Instantly share code, notes, and snippets.

@ryanbuening
ryanbuening / Hotkeys.ahk
Created May 19, 2021
AutoHotKey Script
View Hotkeys.ahk
; #NoEnv is recommended for performance and compatibility with future AutoHotkey releases.
#NoEnv
; Enable #Warn to assist with detecting common errors.
#Warn
; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
; Ensures a consistent starting directory.
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
ryanbuening / Example.cs
Created Jun 24, 2022 — forked from ImsMoon/Example.cs
Mongo C# Driver CRUD CheatSheet
View Example.cs
//Read
//BsonDocument
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
[*.cs]
# Indentation and spacing
indent_style = tab
# New line preferences