Skip to content

Instantly share code, notes, and snippets.

Migrate Azure Functions project from Application Insights to OpenTelemetry

Version 3.0.0 of Microsoft.ApplicationInsights.WorkerService is not compatible with the Azure Functions Worker as reported here and here. There will not be a fix according to this comment. Instead, migrating to OpenTelemetry-based monitoring is advised.

I've written the following instructions for myself to perform a (basic) migration to OpenTelemetry-based monitoring. They are based on:

@onomatopellan
onomatopellan / waydroidwsl2.md
Last active June 20, 2026 09:26
Waydroid in WSL2 with sound (Weston on top of Weston approach)

Waydroid in WSL2 with sound

Requirements

Recommended to install Waydroid in a brand new Ubuntu install. Waydroid needs a custom linux kernel. Actually just needs latest kernel for WSL2 with just these changes before compiling:

CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
@mfd
mfd / teams.sh
Last active June 30, 2026 14:41
Download any video from Microsoft Teams, SharePoint and OneDrive
2teams() {
NOW=$(date +"%Y-%m-%d_%H%M")
if [ ! -z $2 ] ; then
echo $NOW"_"$2.mp4
ffmpeg -i $1 -codec copy $NOW"_"$2.mp4
else
echo $NOW"_teamsvid".mp4
ffmpeg -i $1 -codec copy $NOW"_teamsvideo".mp4
fi
}
import { ChangeDetectorRef, ComponentRef } from '@angular/core';
import { OutletContext, Router } from '@angular/router';
import { Subject } from 'rxjs';
import { pluck, switchMap, takeUntil } from 'rxjs/operators';
import { getCurrentOutlet } from '../functions/get-current-outlet';
import { getRouteWithData } from '../functions/get-route-with-data';
import { StaticInjectorService } from '../services/static-injector.service';
export function NgResolve(name?: string, propagation = true) {
return function(
@ninlith
ninlith / mitm.sh
Last active December 7, 2024 16:18
Local transparent man-in-the-middle proxy setup
#!/usr/bin/env bash
# -*- indent-tabs-mode: nil; tab-width: 4 -*-
command=${@:-"mitmproxy --mode transparent --showhost --set block_global=false"}
if [ ! -f "/etc/ssl/certs/mitmproxyuser.pem" ]; then
sudo apt --yes install inotify-tools mitmproxy nftables
sudo useradd --create-home mitmproxyuser
grep --max-count 1 "mitmproxy-ca-cert.pem" < <( \
sudo inotifywait -mrq -e close_write --format "%f" \
@giacomocerquone
giacomocerquone / adbCommands.txt
Last active May 3, 2026 15:52
Useful adb logcat commands when working with react native
// useful to debug js code errors
adb logcat "*:S" ReactNative:V ReactNativeJS:V
// useful to debug native errors (when the app won't even start)
adb logcat "*:E"
@dfrankland
dfrankland / how_to_use_wireshark_with_nodejs.md
Created May 28, 2020 05:06
How to use Wireshark with Node.js (especially with HTTPS / TLS / SSL)

How to use Wireshark with Node.js (especially with HTTPS / TLS / SSL)

It can be difficult to trace network traffic from a Node.js application. Typically, folks will just instrument some logging to check that everything is working as it is supposed to. Unfortunately, sometimes there are too many abstractions or possible race conditions to accurately get a good trace. To get the most objective possible trace of network traffic Wireshark can be used.

Wireshark is a network protocol analyzer that makes it extremely simple to capture and trace network activity from any source on your computer. It also has

//Reference
//https://gist.github.com/truekonrads/3173572
//https://docs.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtsvirtualchannelquery
//https://github.com/FreeRDP/FreeRDP/blob/master/winpr/libwinpr/wtsapi/test/TestWtsApiQuerySessionInformation.c
#include <Windows.h>
#include <stdio.h>
#include <wtsapi32.h>
#include <tsvirtualchannels.h>
import { timer, Observable } from "rxjs";
import { scan, tap, switchMapTo, first } from "rxjs/operators";
function checkAttempts(maxAttempts: number) {
return (attempts: number) => {
if (attempts > maxAttempts) {
throw new Error("Error: max attempts");
}
};
}
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active May 20, 2026 20:31
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple: