Skip to content

Instantly share code, notes, and snippets.

Ayende Rahien ayende

Block or report user

Report or block ayende

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View users.cs
public class UsersController : Controller
private readonly IAsyncDocumentSession _session;
public ExampleController(IAsyncDocumentSession session)
_session = session;
public async Task<IActionResult> Index()
View configure.cs
public void ConfigureServices(IServiceCollection services)
var settings = new Settings();
var store = new DocumentStore
Urls = settings.Urls,
Database = settings.DatabaseName,
Certificate = new X509Certificate2( settings.CertPath, settings.CertPass)
View Settings.cs
public class Settings
public DatabaseSettings Database { get; set; }
public class DatabaseSettings
public string[] Urls { get; set; }
public string DatabaseName { get; set; }
public string CertPath { get;set; }
public string CertPass { get;set; }
View appsettings.json
"Database": {
"Urls": [
"DatabaseName": "Jazz",
"CertPath": "/mnt/config/jazz.pfx",
"CertPass": null
View spawn.cs
var priorityOrder = new [] {
IDinosaur dino = null;
var errors = new List<Exception>();
foreach(var dinoToGet in priorityOrder)
$ mkdir /journals/bulk
$ ln -s /journals/bulk /data/bulk/Journals
$ sudo mkfs -t ext4 /dev/nvme2n1
$ sudo mkdir /journals
$ sudo mount /dev/nvme2n1 /journals
$ sudo chown -R $USER /journals
# install .net core
$ wget -q
$ sudo dpkg -i packages-microsoft-prod.deb
$ sudo add-apt-repository universe
$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install dotnet-sdk-2.2
# clone repos
View bulk-1.cs
// install-package ravendb.client
// install-package bogus
using Raven.Client.Documents;
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Bench.BulkInsert
# setup the /data drive (512 GB)
$ sudo mkfs -t ext4 /dev/nvme1n1
$ sudo mkdir /data
$ sudo mount /dev/nvme1n1 /data
$ sudo chown -R $USER /data
# setup RavenDB (on home drive)
$ wget
You can’t perform that action at this time.