Skip to content

Instantly share code, notes, and snippets.

@WhereJuly
WhereJuly / example.ts
Last active February 20, 2024 14:39
fastify-http-proxy (fastify/reply-from) replyOptions.onResponse getting the original response body example
'use strict';
import fastify, { FastifyReply, FastifyRequest, RawReplyDefaultExpression, RawServerBase, RequestGenericInterface } from 'fastify';
import proxy from '@fastify/http-proxy';
const server = fastify();
server.register(proxy, {
upstream: 'http://proxied.tld',
prefix: '/proxied',
@WhereJuly
WhereJuly / docker_wsl2.md
Created October 2, 2025 05:07 — forked from sz763/docker_wsl2.md
How to run tests with TestContainers in WSL2 without Docker Desktop

Install docker

in case you haven't docker installed, please follow this instruction https://docs.docker.com/engine/install/ubuntu/

Expose docker port

First way

Create daemon.json file in /etc/docker, with content:

{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}

Second way suggested by @maireadmccabe-fire

@WhereJuly
WhereJuly / modelina-custom-properties-naming.ts
Last active October 24, 2025 10:02
AsyncAPI Modelina custom property names
'use strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import { Parser, fromFile } from '@asyncapi/parser';
import { PropertyKeyContext, TypeScriptGenerator } from '@asyncapi/modelina';
/**
* Modelina by default transforms payload properties' names into `camelCase`. This custom sctript
* retirns the property names as-is keeping your `snake_case` naming in place.
@WhereJuly
WhereJuly / 01-ide.md
Last active August 28, 2026 15:41
VS Code for Python For non-programmers

Установка VS Code для просмотра Python-файлов в Windows

  1. Скачайте бесплатный Visual Studio Code с официального сайта: Скачать VS Code

  2. Выберите Windows — User Installer x64, запустите файл и установите программу с настройками по умолчанию. Microsoft рекомендует User Installer большинству пользователей Windows.

  3. Запустите VS Code и нажмите Ctrl+Shift+X.

  4. Найдите и установите расширение Python от Microsoft: