Skip to content

Instantly share code, notes, and snippets.

View chgeuer's full-sized avatar
🏠
Working from Düsseldorf

Dr. Christian Geuer-Pollmann chgeuer

🏠
Working from Düsseldorf
View GitHub Profile
#!/bin/bash
mkdir device server
cd device
# Create a key pair
openssl genrsa -out device-priv.pem 2048

Regex

[\+\(]?\d[\(\)\-\d\ ]+

Demo text

<!DOCTYPE html>
<html>
<head>
<style>
h1 {co​lor: bl​ue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
namespace JoseJwtTester
{
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Jose; // <PackageReference Include="jose-jwt" Version="2.6.0" />
public class ApplicationCreationRequest
{
[JsonPropertyName("tenantId")]
#!/bin/bash
# --proxy http://127.0.0.1:8888/ --insecure \
aadTenant="chgeuerfte.onmicrosoft.com"
subscriptionId="724467b5-bee4-484b-bf13-d6a5505d2b51"
resourceGroup="longterm"
storageAccountName="chgeuer"
containerName="aadtest"
blobName="index.html"

Interfaces defined in F# and used from C#

For a customer project, I needed to define an interface, and an implementation of that interface, implementing a factory. I wanted to pass in a creation lambda (from C#) to the factory, and the Create() function under the hood should invoke the lambda.

Wrong - The interface defines a property, which returns a Func.

open System
@chgeuer
chgeuer / timecode.md
Last active June 6, 2020 15:22
Timecodes for fsharpConf 2020

Timecodes for fsharpConf 2020

Video: https://www.youtube.com/watch?v=ybkYHYKYeNw

00:02:45-00:18:00 "Welcome to fsharpConf 2020.mp4"
00:18:00-01:03:40 "Hedy - A gradual programming language for education (Felienne Hermans).mp4"
01:14:42-01:50:26 "Formatting FSharp source code (Florian Verdonck).mp4"
01:55:40-02:21:24 "When Korean Hackers Met FSharp (Sang Kil Cha, JongHyup Lee).mp4"
03:06:20-03:55:07 "On Independence! (Don Syme).mp4"
@chgeuer
chgeuer / xunit_nbomber.cs
Created May 25, 2020 14:15
xunit_nbomber.cs
namespace XUnitLoadTestProject
{
using Microsoft.Extensions.Configuration;
using Microsoft.FSharp.Core;
using NBomber.Contracts;
using NBomber.CSharp;
using Serilog;
using System;
using System.Net;
using System.Net.Http;
namespace PlayingWithIoCWebApp
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@chgeuer
chgeuer / 1.cs
Last active April 23, 2020 16:24
namespace RxCheckProviderCount
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
class Message