more of a personal note to remember some commands that were useful. I figure this is more likely to survive or be found compared to a gist/repo/onenote/whatever.
Currently contains powershell to set environment variables properly, list content of partition table on any device from the esp32 families, and an oEmbed test of a LottieFiles animation (success). See TOC!
GitHub Expand All Diffs
javascript:(function(){document.querySelectorAll('button').forEach(function(button){if(button.textContent.includes('Load Diff')){button.click(); button.click();}});})();
Picture in Picture for all videos currently on page, removing the disabled attribute if present:
(Add this as a bookmark then save with a name like 'pip - picture in picture' so it comes up easily in the URL bar)
javascript:document.querySelectorAll("video").forEach(x=>{if(x.networkState!=2)return;x.attributes.getNamedItem("disablepictureinpicture")&&x.attributes.removeNamedItem("disablepictureinpicture");x.focus();x.requestPictureInPicture();})
Lottie Element oEmbed test of open window animation:
[System.Environment]::SetEnvironmentVariable("DOTNET_ASPIRE_CONTAINER_RUNTIME", "podman", "User")
Powershell for getting the partition table from any esp32/etc based device
*assuming the partition table is at 0x8000, but it can also be at 0x9000 on newer boards.
if you get an error and a board is in bootloader mode attached then change offset to 0x9000 and repeat. You need to have already run .\export from the esp-idf folder (for IDF_PATH).
Should only read 0xc00 bytes instead of 0x1000 but wanted to be sure and read two full blocks, doesn't hurt. Change 0x1000 to 0xc00 if you have sense / or want to google what the frick this does
$offset="0x8000"; rm .\esp32c3_$($offset)_0xc00.bin ; python "$($env:IDF_PATH)/components/esptool_py/esptool/esptool.py" read_flash $offset 0x1000 esp32c3_$($offset)_0xc00.bin ; python "$($env:IDF_PATH)/components/partition_table/gen_esp32part.py" .\esp32c3_$($offset)_0xc00.bin
Note to self:
I've created a modified version of ESPTOOL for the web (forked from esptool-js), which allows reading and displaying the partition table of a device, along with downloading any of the partitions (with sensible filenames!) Available to use here: https://tyeth.github.io/read-partitions-esptool-js/ The ported version of gen_esp32part.py is here: https://github.com/tyeth/read-partitions-esptool-js/tree/readCurrentPartitions/src
libtools, LD PATHs, LD_LIBRARY_PATH, LIBDIR, locally installed usbip
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
Ref - WSL2 installing usbip from source for remote ssh usb devices linked in to WSL2 ubuntu, original issue:
https://github.com/microsoft/WSL/issues/40259#issuecomment-4324133143
Hi @tyeth, the wsl ubuntu distro does not ship a linux-tools package. You may resolve this by building and installing usbip from source. You may follow these steps:
sudo apt install build-essential libudev-dev autoconf automake libtool pkg-config git clone https://github.com/microsoft/WSL2-Linux-Kernel.git cd WSL2-Linux-Kernel/tools/usb/usbip ./autogen.sh ./configure make sudo make install sudo ldconfigThen you should be able to use
/usr/local/sbin/usbipto setup the usb device.
usbip auto-bind all devices, related commands / debugging etc
https://gist.github.com/echoes341/66c61923660b590f82f663f49a88a76e
This page (commands for the future) was last updated on April 30, 2026.
Text editor powered by tinymce.