Skip to content

Instantly share code, notes, and snippets.

View zihotki's full-sized avatar

Vasili Puchko zihotki

  • Infront ASA
  • Amsterdam, Netherlands
View GitHub Profile
zihotki / TFSBuildVarsDebug.ps1
Created October 9, 2023 00:09 — forked from heiswayi/TFSBuildVarsDebug.ps1
List all TFS built-in variables for Team Foundation Build (vNext) using PowerShell script
zihotki /
Created September 12, 2023 10:54
freecad export multiple parts
from PySide import QtGui
folder = str(QtGui.QFileDialog.getExistingDirectory(None, "Select Directory"))
a = Gui.Selection.getSelection()
count = 0
import ImportGui
options = None
if hasattr(ImportGui, "exportOptions"):
options = ImportGui.exportOptions(".step")
for b in a:
objs = []
zihotki / Angular 14+ async validator with de-bounce.ts
Created August 21, 2023 11:39
Angular 14+ async validator with de-bounce
employerCodeExists(): AsyncValidatorFn {
return (control: AbstractControl): Observable<ValidationErrors | null> => {
const hasEmployerCode = this.hasEmployerCodeFormControl.value;
const controlValue: string = control.value;
// Note: see
// for explanation of why this is the most correct way to do async validation with debounce
if (hasEmployerCode && controlValue) {
return of(controlValue)
import FileHound from "filehound";
import { promises as fs } from "fs";
import path from "path";
import { promisify } from "util";
// const packages = await FileHound.create()
// .paths(`packages`)
// .directory()
// .depth(1)
// .find();
zihotki / PerMinuteInExcessOf.cs
Created August 11, 2022 00:41 — forked from nblumhardt/PerMinuteInExcessOf.cs
Proof of concept rate limiting filter for Serilog
using System;
using Serilog;
using Serilog.Configuration;
namespace ConsoleApplication8
static class Program
static void Main()
zihotki / gist:3881fe398f83dc2097c04f0233e56a9c
Created March 23, 2018 22:16 core reverse proxy
Install the Add the Microsoft.AspNet.HttpOverrides package
In your Configure() method add
app.UseOverrideHeaders(new OverrideHeaderMiddlewareOptions
ForwardedOptions = ForwardedHeaders.XForwardedFor |
zihotki / Lighter or Darker a Color.cs
Created December 17, 2017 00:17
.net C# make a color lighter or darker
/// <summary>
/// Creates color with corrected brightness.
/// </summary>
/// <param name="color">Color to correct.</param>
/// <param name="correctionFactor">The brightness correction factor. Must be between -1 and 1.
/// Negative values produce darker colors.</param>
/// <returns>
/// Corrected <see cref="Color"/> structure.
/// </returns>
public static Color ChangeColorBrightness(Color color, float correctionFactor)
zihotki /
Created March 15, 2017 21:31 — forked from btroncone/
A Comprehensive Introduction to @ngrx/store - Companion to Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

zihotki / .bash_profile
Created June 4, 2016 16:41
My personal settings for git
alias g=git
alias ls='/bin/ls -F --color=tty --show-control-chars'
alias ga='gitk --all&'
alias gs='git st'
zihotki / RecursiveStack.cs
Created May 31, 2016 21:03
Stack implementation using recursive links
using System;
public class Program
public static void Main()
var stack = new Stack();