Skip to content

Instantly share code, notes, and snippets.

View fvoronin's full-sized avatar

Philipp Voronin fvoronin

  • Russia, Chelyabinsk
View GitHub Profile

How to shrink docker_data.vhdx

Previous tutorials didnt worked for me because my setup is a little bit odd.
I'm using windows 11 machine with WSL2 and docker desktop.
I also use k3d to create kubernetes cluster. Also my k3d cluster have local registry
I also used skaffold and other shinigens

0. How much garbage you have?

%USERPROFILE%\AppData\Local\Docker\wsl\disk\ - there is your docker_data.vhdx

@fvoronin
fvoronin / ScrollManager.jsx
Created July 26, 2019 17:05 — forked from jeffijoe/ScrollManager.jsx
Save and restore scroll position in React
/*
The MIT License
Copyright (c) Jeff Hansen 2018 to present.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W
@fvoronin
fvoronin / ObjectEditor.ts
Created April 4, 2018 10:50
Typedoc namespace merging issue
import "Options";
class ObjectEditor {
static defaultOptions: ObjectEditorNs.Options = {
title: undefined,
type: undefined,
}
options: ObjectEditorNs.Options;
@fvoronin
fvoronin / Dummy.ts
Created March 28, 2018 10:56
type2docfx and @throws tag
export class Foo {
/**
* @throws Exception description.
*/
public bar() {
}
}
@fvoronin
fvoronin / Observable.ts
Created March 28, 2018 09:05
type2docfx "Function Types" example
export interface ObservableGetter<T> {
(): T;
}
export interface ObservableSetter<T> {
(v: T): void;
}
export interface ObservableProperty<T> extends ObservableSetter<T>, ObservableGetter<T> {
}
042a53463d42ec46d6308bedc303328a2b14448778b47f8d08ea7d0e75870f39de303df37ebfcaf9734ec55b8a1ab59d6d31ea9fb1e2feee475309187d6441b244
@fvoronin
fvoronin / Program.cs
Created July 31, 2017 06:28
RabbitMQ topology recovering
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
@fvoronin
fvoronin / Program.cs
Last active July 13, 2017 08:34
RabbitMQ topology not recovering
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using RawRabbit.Configuration;
using RawRabbit.Configuration.Exchange;
using RawRabbit.vNext;
using RawRabbit.vNext.Disposable;
@fvoronin
fvoronin / gist:6ba01adf89656f59fc028bc4972f5da8
Created April 11, 2016 06:41
ActiveDirectoryUserService.cs
using System;
using System.Collections.Generic;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using IdentityServer3.Core;
using IdentityServer3.Core.Models;
using IdentityServer3.Core.Services.Default;
using System.DirectoryServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.InteropServices;
using System.Diagnostics;
public class MessageHelper
{