Skip to content

Instantly share code, notes, and snippets.

View Danthar's full-sized avatar

Arjen Smits Danthar

  • The Netherlands
View GitHub Profile
@jnm2
jnm2 / JosephPersonalDesktopBoxstarter.ps1
Last active July 28, 2022 11:17
Joseph personal desktop Boxstarter script
# TODO: Set sound scheme to 'No sounds'
# Notepad++ TODOs:
# %appdata%\Notepad++\config.xml, /NotepadPlus/GUIConfigs/GUIConfig[name='TabSetting']/@replaceBySpace, 'yes'
# %appdata%\Notepad++\config.xml, /NotepadPlus/GUIConfigs/GUIConfig[name='auto-completion']/@autoCAction, 0
# %appdata%\Notepad++\stylers.xml, /NotepadPlus/GlobalStyles/WidgetStyle[fontName='Courier New']/@fontName, 'Consolas'
# TODO: unpin Edge and Store and pin default apps
$ErrorActionPreference = 'Stop'
@Horusiath
Horusiath / example.cs
Last active April 17, 2022 10:27
Generic persistent gateway for Akka.NET at-least-once-delivery semantics
// Delivery mechanism looks like this - if sender wants to reliably deliver payload to recipient
// using at-least-once delivery semantics, it sends that payload wrapped to Messenger actor, which
// is responsible for the persistence and redelivery:
//
// +--------+ +-----------+ +-----------+
// | |--(DeliverOrder<T>)-->| |--(Delivery<T>:1)-->| |
// | | | | /* 2nd attempt */ | |
// | Sender | | Messenger |--(Delivery<T>:2)-->| Recipient |
// | | | | | |
// | | | |<----(Confirm:2)----| |
@Horusiath
Horusiath / EnumerableActorRef.cs
Last active December 15, 2015 16:51
This is example of returning responses from actor refs in form of the enumerable.
public static class EnumerablePatterns
{
public static IEnumerable<T> Query<T>(this ICanTell self, object message = null)
{
var provider = ResolveProvider(self);
if (provider == null)
throw new NotSupportedException("Unable to resolve the target Provider");
var enumerable = new BlockingCollection<T>();
var path = provider.TempPath();
@Aaronontheweb
Aaronontheweb / AzureBootstrapper.cs
Created October 12, 2015 14:09
Akka.NET Cluster Bootstrapper
namespace WebCrawler.AzureBootstrap
{
public static class AzureRuntimeBootLoader
{
public static async Task<Config> CreateRuntimeConfig(string seedRoleName, string akkaEndpoint)
{
// Need to wait until at least 1 instance of our seed role is up and available
while(!IsSeedRoleAvailable(seedRoleName))
{
await Task.Delay(TimeSpan.FromSeconds(1.5));
@davidfowl
davidfowl / dotnetlayout.md
Last active April 23, 2024 14:25
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@warappa
warappa / Bootstrap.cs
Last active December 22, 2015 00:19
A possible way of doing event-versioning with NEventStore and a custom Json.Net NEventStore-serializer.
public class EventStorageBootStrap
{
public static void BootStrap()
{
...
var eventStore = Wireup.Init()
...
.UsingNewtonsoftJsonSerialization(new VersionedEventSerializationBinder())
...
.Build();