Skip to content

Instantly share code, notes, and snippets.

View Aaronontheweb's full-sized avatar
🚀
Shipping!

Aaron Stannard Aaronontheweb

🚀
Shipping!
View GitHub Profile
@Aaronontheweb
Aaronontheweb / mumurhash.linq
Created May 7, 2023 17:32
LINQPad Query to Visualize MurmurHash Distributions
// requires the `Akka` NuGet package to be installed in the query
int entitiesPerNodeFactor = 100;
List<string> nodes = Enumerable.Range(0, 10).Select(c => $"hostname-{c}").ToList();
Dictionary<string, int> entityToNodeAllocations = nodes.ToDictionary(c => c, k => 0);
var entityIds = Enumerable.Range(0, nodes.Count * entitiesPerNodeFactor).Select(e => $"entity-{e}");
foreach(var e in entityIds){
var hashCode = MurmurHash.StringHash(e);
@flcdrg
flcdrg / boxstarter-bare-v3.ps1
Last active March 25, 2024 01:47
My BoxStarter Scripts
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
}