Skip to content

Instantly share code, notes, and snippets.

View Demuirgos's full-sized avatar
💭
I am Code-Talker

Ayman Bouchareb Demuirgos

💭
I am Code-Talker
View GitHub Profile
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
using System;
using System.Diagnostics;
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<MonitorCompare>();
static class Log {
@Demuirgos
Demuirgos / DumbDiffer.fs
Created September 22, 2022 10:31
Compare ws changes
// For more information see https://aka.ms/fsharp-console-apps
open System
open System.IO
open System.Text.RegularExpressions
// assumption is folders to compare are in the same path and they have the same sub-folders hierarchy
let basePath = "" // root path
let targetFolders = [] // folders to compares
let latterPath = "" // sub paths in folders to compare
@Demuirgos
Demuirgos / main.fs
Last active July 8, 2022 18:37
DirectTrees Vs InvertedTrees
open System
type metadata = string
type NodeBody = {
Id : int
Parent : int
Metadata : string
}
and InvertedNode =
| IChild of NodeBody
@Demuirgos
Demuirgos / Math.hs
Created May 22, 2022 17:28 — forked from pedrominicz/Math.hs
Simple arithmetic expression parsec.
module Math where
import Text.Parsec
import Text.Parsec.String
data Expr
= Num Integer
| Op Op Expr Expr
deriving Show
@Demuirgos
Demuirgos / LocalStorage.cs
Created January 8, 2022 11:32
Boilerplate to use LocalStorage in BlazorWasm App
using System.Threading.Tasks;
using Microsoft.JSInterop;
using System.Text.Json;
namespace ClientSide.Services
{
public interface ILocalStorage
{
Task SaveAsync<T>(string name, T item) where T : class;
Task DeleteAsync(string name);