Skip to content

Instantly share code, notes, and snippets.

View NikiforovAll's full-sized avatar
🇺🇦

Oleksii Nikiforov NikiforovAll

🇺🇦
View GitHub Profile
https://nikiforovall.blog/pi-inspect/#s=7b3rdtxGsib6KrmqZ22SblSVJF9675IsN0XRNrt14YhUe_dx-YhZQFYVTBQSRgIkq23tNb9mze9Z8wTn0fpJznwRkQmgqnjTxbeWf1gsIJGXyMjIuMePPWecS21-kPRGvTt3_8N88slk0p_8x2ef9P-U3In72vzH3f7d6WcfJ_emn37672bSi_wnz_TC9EZ5nWVRLz7H9w_mdmEejseJORuPi7Sf5q4wcdWLegubmMw3dktXmcVhaRdF1Rv1_m5rpUujdK7MRWHKSsU2SfOZ0s6lrtJ5pWxhSl3hWZq7NDGqSCOlQ7uZySs112VunBso9Dc3WaFqZ0qnJktVGk0Np2lmXKTMhYlr6i22i4XOEzxLUnmSmEjpPFHnJT_JzTl_OBjn43z3TKeZnmRGVdZmbjTO-9T9SL0wOqGGKrZ5ZfLK4d1Eu_lI7dOIhn6FQdV25iI1K00RqWmaJ5EyVTzYwVeYzUg91adGFaWJU2e4Zzx36jyt5spc6LhSlbmoVGmKTMdmYfIqUmkeZzWtdlFnVVpkRiWp-96meSWfp7myuVGxzjKMhXWakdorja6MsqWyZ6akh7xsWkWaJ6-KTOcj9SjNE6XVQpeniT3PFZ7y5CqrqrlRcV2W2A_BEvXP__F_aCylp5UpA1jDd-i_KG1snMOScz0DnOLTWWnrPPGvDC_b1pWaZDY-RRc0ms3PTOl0ldocPVU2saEbrSrtTlWWuopmV-r4lMHSd5Up0PesNI6WqN3pKyDMqx9q49DbSO26UxoDj1VdoItPlKvKOq7q0iTKt3Rq-17_E2UL_mF0PN9R53OTq9L8UKcl7YxjHF9M0lltaxoyc8VIHeSVKbGVtKtPjg6VMyWWpKa2JHRUaV6ZLEtnJo_NSCVmmuYpDRWp0kxNiecuUnNsXKSSVM9y66o0dpFyy8XEAs1oB-apKXUZz5cRd6xj6oawwExeOYOXI_US6GZLPFOl4afNYgfqkEZV
#!/bin/bash
set -euo pipefail
CONTAINER_NAME="aspire-dashboard"
IMAGE="mcr.microsoft.com/dotnet/aspire-dashboard"
UI_PORT="18888"
OTLP_PORT="4317"
detect_runtime() {
if command -v podman &>/dev/null; then
@NikiforovAll
NikiforovAll / Measure-ProcessMemory.ps1
Created November 20, 2025 12:53
Measure-ProcessMemory.ps1
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Measures the peak working set memory of a process.
.DESCRIPTION
Starts a process and reports its peak working set memory usage after completion.
Similar to the 'time' command but focuses on memory metrics.
.PARAMETER ProcessPath
@NikiforovAll
NikiforovAll / arch.wsd
Created October 16, 2024 09:05
enterprise-search-architecture
@startuml Case Study
!pragma revision 1
' the folowwing diagram describes the system that has web api and workers (jobs) to to a background processing, jobs puts content in postgres, elastic and azure blob storage and web api uses elastic for search
' left to right direction
' https://github.com/plantuml-stdlib/Azure-PlantUML
!define AzurePuml https://raw.githubusercontent.com/plantuml-stdlib/Azure-PlantUML/release/2-2/dist
!includeurl AzurePuml/AzureCommon.puml
# Preview file content using bat (https://github.com/sharkdp/bat)
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
export FZF_DEFAULT_OPTS="
--preview 'bat -n --color=always {}'
"
/*!
* MudBlazor (https://mudblazor.com/)
* Copyright (c) 2021 MudBlazor
* Licensed under MIT (https://github.com/MudBlazor/MudBlazor/blob/master/LICENSE)
*/.mud-primary{background-color:var(--mud-palette-primary) !important}.mud-primary-text{color:var(--mud-palette-primary) !important;--mud-ripple-color: var(--mud-palette-primary) !important}.mud-primary-hover{background-color:var(--mud-palette-primary-hover) !important}@media(hover: hover)and (pointer: fine){.hover\:mud-primary-hover:hover{background-color:var(--mud-palette-primary-hover) !important}}.hover\:mud-primary-hover:focus-visible,.hover\:mud-primary-hover:active{background-color:var(--mud-palette-primary-hover) !important}.mud-border-primary{border-color:var(--mud-palette-primary) !important}.mud-theme-primary{color:var(--mud-palette-primary-text) !important;background-color:var(--mud-palette-primary) !important}.mud-secondary{background-color:var(--mud-palette-secondary) !important}.mud-secondary-text{color:var(--mud-palette-secondary) !import
{
"id": "f0971e2a-c2a9-41bd-87b0-f29626cf4766",
"realm": "Test",
"notBefore": 0,
"defaultSignatureAlgorithm": "RS256",
"revokeRefreshToken": false,
"refreshTokenMaxReuse": 0,
"accessTokenLifespan": 300,
"accessTokenLifespanForImplicitFlow": 900,
"ssoSessionIdleTimeout": 1800,
@NikiforovAll
NikiforovAll / Program.cs
Created August 25, 2022 13:28
ConfigurationBuilder Example
using Microsoft.Extensions.Configuration;
var configuration = new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary<string, string>{ ["Label"] = "Secret"})
.AddEnvironmentVariables("MyAwesomeApp")
.AddUserSecrets<Program>()
.Build();
Console.WriteLine(configuration.GetDebugView().Trim(':').Trim());
@NikiforovAll
NikiforovAll / Program.cs
Created August 12, 2022 13:06
Search in XML <flowable:eventInParameter>
using Spectre.Console;
using System.Text.RegularExpressions;
foreach (var file in new DirectoryInfo(@"./bpmn-models").GetFiles("*.bpmn"))
{
ProcessFile(file);
}
void ProcessFile(FileInfo file)
{
@NikiforovAll
NikiforovAll / ProtectedView
Created June 11, 2022 06:51
ProtectedView
using System.Reflection;
namespace ProtectedViews;
public class ProtectedView
{
private readonly ISet<string> denyList;
public ProtectedView(params string[] fields)
{