Skip to content

Instantly share code, notes, and snippets.

View natalie-o-perret's full-sized avatar
🐈
F#-ing

Natalie Perret natalie-o-perret

🐈
F#-ing
View GitHub Profile
@natalie-o-perret
natalie-o-perret / README.md
Created March 6, 2021 15:45
Gopass Setup

Kleopatra

  • Import your (previously exported) private key
  • gopass init
  • edit config file ~/.config/gopass and change with your-path (gopass config path {your-path} is case-insensitive)
  • Note: your-path must be the passwords git repository
  • "Voila"
@natalie-o-perret
natalie-o-perret / README.md
Created July 31, 2020 16:20
Expectations for an event store.md

Expectations

What I expect from some system managing storage of streams of events, intended to be used in an event-sourced system.

  • ability to create streams
  • ability to delete streams
  • ability to use optimistic locking on stream level
  • ability to write a batch of events in one stream atomically and durably
  • ability to read events from one stream
  • ability to read all events in the store ( the so called "$all" stream)
@natalie-o-perret
natalie-o-perret / Output.md
Created June 20, 2020 01:24
Cheap F# TypeClass Impl.
[|42; 42; 42|]
[42; 42; 42]
seq [42; 42; 42]
Some 42
Ok 42
@natalie-o-perret
natalie-o-perret / Program.cs
Last active June 16, 2020 21:52
Kevin Goss - Design and Code Tasks from Scratch
using System;
using System.Threading;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
namespace CSharpStuff
{
// Alternative to referencing Microsoft.VisualStudio.Threading
public class SingleThreadedSynchronizationContext : SynchronizationContext
@natalie-o-perret
natalie-o-perret / Program.fs
Created April 17, 2020 13:14
Hot / Cold asynchrony
open System.Threading.Tasks
open FSharp.Control.Tasks.V2.ContextInsensitive
let aTask = task {
do! Task.Delay(1000)
printfn "I'm in aTask"
}
let anAsync = async {
@natalie-o-perret
natalie-o-perret / docker+kubernetes-notes.md
Last active April 22, 2019 18:16
Docker + Kubernetes Notes

Docker

Some definitions

  • Layer: Files generated from running some command, also called intermediate images. Reused by multiple images to reduce image and size.
  • Image: A docker container image is created using a dockerfile (ie. build). Every line in a dockerfile will create a layer.
  • Container: an instance of an (read-only) image.
  • Docker Client: the CLI tool that allows the user to interact with the Docker Server.
  • Docker Server: aka Docker Daemon, the background service running on the host that manages the building, running and distributing Docker containers.