Skip to content

Instantly share code, notes, and snippets.

View ilKhr's full-sized avatar
🏠
Working from home

Khorishko Ilya ilKhr

🏠
Working from home
View GitHub Profile
@ilKhr
ilKhr / Resize tutorial.md
Created February 2, 2024 13:25
Resize WSL2 disk

Resize Docker (Link)

Turns out there is a way to shrink the vhdx images properly in windows:

  1. Run in cmd: docker system prune (optional --all), to clean up disk space
  2. Right mouse click on docker desktop in system tray -> quit
  3. Run in cmd: wsl --shutdown
  4. Run Optimize-VHD -Path "$env:LOCALAPPDATA\Docker\wsl\data\ext4.vhdx" -Mode Full, this will resize the vhdx images Same way you can try to find vhdx images that utilize too much space and optimize them as well. You can use TreeSize(Bing it: Tree Size Windows) to find which image takes the most of the space and optimize them.

P.S. dont forget to run docker system prune

@ilKhr
ilKhr / dfQuery.ts
Last active September 20, 2020 08:28
File for save contexts DialogFlow when use Default Intent
export type DfRequest = {
headers: object;
body: {
session: string;
responseId: string;
queryResult: IQueryResult;
originalDetectIntentRequest: IOriginalDetectIntentRequest;
};
};