Skip to content

Instantly share code, notes, and snippets.

View deviousasti's full-sized avatar
🏡
Working from home

Asti deviousasti

🏡
Working from home
View GitHub Profile
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active April 8, 2025 07:50
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@Kavignon
Kavignon / improving-as-a-software-developer.md
Last active October 27, 2023 17:49
Always hungry for more. This is a list of resources I've used or that I plan to use as a way to improve my knowledge and technical skills as a software developer.

Some of the books I'll be recommending are based on .NET. Do not be discouraged. We shouldn't strive to stick to a specific technology stack. Your ambitions and goals will evolve over time and that might lead you a completely new space. Moreover, there are lessons to be learned from an environment that's different from what you're used to.

Software Development

@swlaschin
swlaschin / effective-fsharp.md
Last active October 20, 2024 12:47
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

@mathias-brandewinder
mathias-brandewinder / App.fs
Last active July 11, 2020 13:56
Lorentz attractor in Fable-Elmish
(*
Simulation of the Lorentz attractor, using Fable.
If you want to see this code in action, just copy this code into the Fable REPL:
https://fable.io/repl/
*)
module App
open Elmish
open Elmish.React
@kchristidis
kchristidis / protobuf-serialization.md
Last active March 25, 2025 17:49
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@mrange
mrange / RResult.md
Created March 18, 2017 12:32
Railway Oriented Programming and F# Result

Railway Oriented Programming and F# Result

Full source: https://gist.github.com/mrange/aa9e0898492b6d384dd839bc4a2f96a1

Option<_> is great for ROP (Railway Oriented Programming) but we get no info on what went wrong (the failure value is None which carries no info).

With the introduction F# 4.1 we got Result<_, _> a "smarter" Option<_> as it allows us to pass a failure value.

However, when one inspects the signature of Result.bind one sees a potential issue for ROP:

@tomspilman
tomspilman / gist:99ddac3b60f72814c6e5
Created January 30, 2015 07:35
Resolving Generic Types In Mono.Cecil
public static TypeReference ResolveGenericParameter(this TypeReference type, TypeReference parent)
{
var genericParent = parent as GenericInstanceType;
if (genericParent == null)
return type;
if (type.IsGenericParameter)
return genericParent.GenericArguments[(type as GenericParameter).Position];
if (type.IsArray)
@mukhtyar
mukhtyar / README.md
Last active March 30, 2020 18:56
Map of India's Parliamentary Constitiencies, 2014
@soarez
soarez / ca.md
Last active April 24, 2025 12:51
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@muratg
muratg / monadicParser.fs
Created November 28, 2012 19:55
Monadic parsing in F# - translated from "Monadic parsing in Haskell" paper by Graham Hutton & Erik Meijer
// ===================
// Monadic parsing in F#
// by Murat Girgin
// Translated from "Monadic parsing in Haskell" paper by Graham Hutton & Erik Meijer
// Source: http://www.cs.nott.ac.uk/~gmh/pearl.pdf
// ===================
#nowarn "40"
// ---------------------------------------------------------------------------------