This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Frozen; | |
using System.Runtime.CompilerServices; | |
using System.Text.Json; | |
using System.Text.Json.Nodes; | |
using Akka.Actor; | |
using Akka.DependencyInjection; | |
using Akka.IO; | |
using Microsoft.Extensions.Logging; | |
using TCRB.CoreApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<AutoOpen>] | |
module RunHelpers | |
#r "nuget: FSharp.Control.Reactive" | |
open System | |
open System.Diagnostics | |
open System.IO | |
open System.Threading | |
open FSharp.Control.Reactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using LanguageExt; | |
using static LanguageExt.Prelude; | |
public static class Program { | |
public static void Main (string[] args) { | |
var program = | |
from v1 in Load | |
from _1 in eff(() => Console.WriteLine($"1st value = {v1}")) | |
from v2 in Load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "nuget:Akka.Remote" | |
open System | |
open Akka.Actor | |
open Akka.Configuration | |
type Pinger() = | |
inherit UntypedActor() | |
let Context = ActorBase.Context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Concurrent; | |
using Microsoft.Extensions.Logging; | |
namespace RZ.Foundation; | |
/// <summary> | |
/// A mailbox processor that allows some concurrent dispatching. | |
/// </summary> | |
/// <param name="logger">Microsoft Logger</param> | |
/// <param name="concurrentLimit">Maximum number of concurrent threads allowed to process the mailbox</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MongoDB.Bson; | |
using MongoDB.Bson.Serialization; | |
using MongoDB.Bson.Serialization.Conventions; | |
using MongoDB.Bson.Serialization.Serializers; | |
using LanguageExt; | |
public class SeqSerializationProvider : IBsonSerializationProvider | |
{ | |
public IBsonSerializer? GetSerializer(Type type) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nowarn "760" | |
#r "nuget:Confluent.Kafka" | |
open System | |
open System.Diagnostics | |
open System.Threading | |
open Confluent.Kafka | |
[<Literal>] | |
let Topic = "test-topic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From: https://angrydexterous.github.io/typeclassish.html | |
type Num<'A> = | |
abstract member Add: 'A -> 'A -> 'A | |
abstract member Subtract: 'A -> 'A -> 'A | |
[<Struct; NoComparison; NoEquality>] | |
type TInt = | |
interface Num<int> with | |
member my.Add x y = x + y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<AutoOpen>] | |
module Tirax.KMS.AdaptiveExtension | |
open System | |
open System.Runtime.CompilerServices | |
open FSharp.Data.Adaptive | |
[<Struct; IsReadOnly>] | |
type AsyncResult<'T> = | |
| Loading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-IsoFile | |
{ | |
<# .Synopsis Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders .Example New-IsoFile "c:\tools","c:Downloads\utils" This command creates a .iso file in $env:temp folder (default location) that contains c:\tools and c:\downloads\utils folders. The folders themselves are included at the root of the .iso image. .Example New-IsoFile -FromClipboard -Verbose Before running this command, select and copy (Ctrl-C) files/folders in Explorer first. .Example dir c:\WinPE | New-IsoFile -Path c:\temp\WinPE.iso -BootFile "${env:ProgramFiles(x86)}\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg\efisys.bin" -Media DVDPLUSR -Title "WinPE" This command creates a bootable .iso file containing the content from c:\WinPE folder, but the folder itself isn't included. Boot file etfsboot.com can be found in Windows ADK. Refer to IMAPI_MEDIA_PHYSICAL_TYPE enumeration for possible media types: http://msdn.mi |
NewerOlder