Skip to content

Instantly share code, notes, and snippets.

View madhub's full-sized avatar

madhub

View GitHub Profile

Sometimes power LED does not switch on when bluetooth slider is movied to position 2.
To reset. Switch off the power, move the slider to position 2, press & hold ESC key & TILDE(~) key together & switch on the power.
Dell community support thread

@madhub
madhub / tools.md
Last active January 27, 2023 11:55
tools

Load test tools

  • Apache JMeter
  • ApacheBench (ab)
  • Gatling
  • k6
  • Locust
  • West Wind WebSurge
  • Netling
  • Vegeta
  • NBomber
@madhub
madhub / kubernetes-env.md
Last active January 22, 2023 12:26
Kubernestes environemnt variable accessible inside container

Simple Web API Delpoyment using minikube

  1. Make sure point DOCKER HOST to internal minikube registery
this will setup DOCKER_HOST point to internal minikube reg
 eval $(minikube -p minikube docker-env)

2.Simple Deployement/Service file files

apiVersion: apps/v1
kind: Deployment
@madhub
madhub / dotnetipv4nipv6.md
Created January 19, 2023 05:02
Supporting IPv4 and IPv6 dual mode network with one socket

Supporting IPv4 and IPv6 dual mode network with one socket

// TCP Server
var listener = new TcpListener(new IPEndPoint(IPAddress.IPv6Any, 8080));
listener.Server.DualMode = true;
listener.Start();

// TCP Client
var client = new TcpClient(AddressFamily.InterNetworkV6);

Table of Contents

  1. Propagate headers with .NET Core Web API
  • StreamConfiguationSource - reading configuration from any Stream source
  • ServiceProviderOptions.ValidateOnBuild - validates the dependencis injected into DI
  • Module Initializers - Module initializers are very useful when you want to eager load something before anything else executes
[ModuleInitializer]
public static void Magic()
// usage
builder.Logging.AddConsole(options =>
    {
        options.FormatterName = "customName";
    })
    .AddConsoleFormatter<CustomFormatter, CustomOptions>(options1 =>
    {
        options1.IncludeScopes = true;
        options1.UseUtcTimestamp = true;
Online form creation template https://www.typeform.com/
type completion for your terminal https://fig.io/