Skip to content

Instantly share code, notes, and snippets.

View Azaferany's full-sized avatar
🎯
Focusing

Ali Zaferany Azaferany

🎯
Focusing
View GitHub Profile
@Azaferany
Azaferany / docker-compose.yml
Created March 13, 2023 17:27 — forked from aRmanNM/docker-compose.yml
grafana + prometheus + node_exporter
version: '3.8'
networks:
monitoring:
driver: bridge
volumes:
prometheus_data: {}
grafana_data: {}
@Azaferany
Azaferany / Program.cs
Created June 1, 2022 13:38
Microsoft RulesEngine Demo
using Newtonsoft.Json;
using RulesEngine.Models;
while (true)
{
string text = System.IO.File.ReadAllText(@"./workflow.json");
var workflowRules = JsonConvert.DeserializeObject<Workflow[]>(text);
var reSettings = new ReSettings()
{
@Azaferany
Azaferany / Configuring ALL HttpClients named or unnamed
Last active July 17, 2022 11:03
add handler to all http client (Configuring ALL HttpClients named or unnamed)
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Http;
using Microsoft.Extensions.Options;
using Polly;
using Prometheus;
var services = new ServiceCollection();
services.AddSingleton<IHttpMessageHandlerBuilderFilter, DefaultHttpMessageHandlerBuilderFilter>();
Console.WriteLine("Hello World!?");
Console.WriteLine("Minimal Test For Github Gist");