Skip to content

Instantly share code, notes, and snippets.

View skynode's full-sized avatar
💭
I may be slow to respond.

Obi skynode

💭
I may be slow to respond.
  • Amsterdam, The Netherlands
View GitHub Profile
@skynode
skynode / tmux-cheatsheet.markdown
Last active March 29, 2024 10:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@skynode
skynode / WSE3Client.cs
Created February 6, 2019 08:28
Working with WSE3.0 Services
// Copyright (c) Microsoft Corporation. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography.X509Certificates;
using System.ServiceModel;
using System.ServiceModel.Security;
using System.ServiceModel.Channels;
@skynode
skynode / TaskExt.Delay.cs
Created August 6, 2022 01:51 — forked from noseratio/TaskExt.Delay.cs
Implementing Task.Delay using a custom awaiter and unmanaged CreateTimerQueueTimer
using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication
{
// by noseratio - stackoverflow.com/users/1768303/noseratio
class TaskExt
{
@skynode
skynode / README.md
Created October 9, 2017 02:00 — forked from eddiejaoude/README.md
Install Firefox addon/extension with no user interaction
@skynode
skynode / effective-fsharp.md
Created May 27, 2022 15:42 — forked from swlaschin/effective-fsharp.md
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

@skynode
skynode / README.md
Created May 26, 2022 02:46 — forked from mrange/README.md
# F# Advent 2021 Dec 08 - Fast data pipelines with F#6

F# Advent 2021 Dec 08 - Fast data pipelines with F#6

Thanks to Sergey Tihon for running F# Weekly and F# Advent.

Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.

TLDR; F#6 enables data pipelines with up to 15x less overhead than LINQ

There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda.

using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>
@skynode
skynode / Example.cs
Created May 20, 2022 02:02 — forked from davidfowl/Example.cs
An implementation of MessagePipe. Something like a channel but with buffer management so you can peek and advance the message that was read.
using System.Buffers;
using System.Net.WebSockets;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/ws", async (HttpContext context) =>
{
const int MaxMessageSize = 1024 * 1024;
@skynode
skynode / MinimalAPIs.md
Created May 3, 2022 10:21 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance