Skip to content

Instantly share code, notes, and snippets.

Avatar

ylorph ylorph

  • EventStore Ltd.
  • Earthbound
View GitHub Profile
@skleanthous
skleanthous / ParkingLot.cs
Created Aug 11, 2021
The parking lot implementation
View ParkingLot.cs
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using EventStore.Client;
namespace BullOak.Repositories.EventStore.Test.Integration
{
internal record InspectionId(Guid Id);
internal record LicencePlate(string PlateNumber);
@Nimrodda
Nimrodda / letsencrypt-wildcard-renewal.md
Last active Jan 10, 2022
Setup automatic LetsEncrypt wildcard certificate renewal on Ubuntu server 18.04 with Namecheap
View letsencrypt-wildcard-renewal.md

All credits go to by Bryan Roessler for his original post that I followed on how to setup LetsEncrypt wildcard certificate auto-renewal with Namecheap. I highly recommend you read his tutorial first and if you bump into issues, check out this gist next.

Unfortunately the original article is not up-to-date and doesn't have the option to leave comments so I can't communicate with the author for updates so I decided to write the updates in a Gist. I highlighted the sections that required an updated with Correction #:. I managed to get the correct setup with the help of the amazing guys at LetsEncrypt community. Here's the help thread.

Set up acme-dns

  1. Download acme-dns from https://github.com/joohoi/acme-dns/releases
  2. Move the binary somewhere sensible since we will be using
View Mayonnaise.cs
// reference SqlStreamStore.Postgres, Newtonsoft.Json
// use C# 7.3+
using System;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SqlStreamStore;
using SqlStreamStore.Streams;
@jboner
jboner / latency.txt
Last active Jan 26, 2022
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD