Skip to content

Instantly share code, notes, and snippets.

View DmitryMyadzelets's full-sized avatar

Dmitry Myadzelets DmitryMyadzelets

View GitHub Profile

28/10/2024

Buongiorno Vito,

sentito anche Silvio Davolio, aggiungo qualche commento che vorrebbe essere di chiarimento su alcuni punti della tua email. Naturalmente i colleghi dell'ISAC potranno aggiungere o correggere quanto sotto.

I modelli ISAC che citi, MOLOCH in particolare, per l'evento del 19 ottobre sono stati meno "precisi", in termini di quantità di precipitazione prevista,

@DmitryMyadzelets
DmitryMyadzelets / how-to-flash.md
Last active October 11, 2024 06:56
Sonoff Zigbee 3.0 USB Dongle Plus (EFR32MG21) with router firmware

So, I wanted update the Sonoff ZBDongle-E dongle as it's recommended in this post: https://www.zigbee2mqtt.io/devices/ZBDongle-E.html.

The web flasher couldn't connect to the dongle under Windows.

Found how to flash it with a console tool under Linux: https://community.home-assistant.io/t/issue-flashing-sonoff-zbdongle-e/654946/3

> universal-silabs-flasher --device /dev/ttyUSB0 probe
2024-10-10 15:36:45.282 MSI universal_silabs_flasher.flasher INFO Probing ApplicationType.GECKO_BOOTLOADER at 115200 baud
2024-10-10 15:36:47.319 MSI universal_silabs_flasher.flasher INFO Probing ApplicationType.CPC at 460800 baud
@DmitryMyadzelets
DmitryMyadzelets / batch-commands.md
Created September 18, 2024 08:35
Manipulate w lots of files (e.g. images)

Remove every image which name contains 32 symbols after the "-" symbol:

find . -type f | grep -E '*-.{32}.jpg' | xargs rm -f

Convert PNG to JPG:

find . -type f | grep -E '*.png' | xargs -n 1 bash -c 'convert "$0" "${0%.*}.jpg"'
@DmitryMyadzelets
DmitryMyadzelets / strength.md
Last active July 25, 2024 09:33
Strength calculation for PEC

Strength calculation

The calculations are made according to the GOST 34233.2-2017 standard: "Vessels and apparatus. Norms and methods of strength calculation. Calculation of cylindric and conic shells, convex and flat bottoms and covers"

Cylindrical shell

Symbols:

  • $D$ - diameter of the cylinder, mm
  • $s$ - thickness of the cylinder's wall, mm
  • $p$ - overpressure, MPa
  • $\sigma$ - allowable stress in the material, MPa
  • $\psi$ - welding factor (1 if no welding)
@DmitryMyadzelets
DmitryMyadzelets / peltier-stack-configs.md
Created July 19, 2024 09:20
Configurations of the Peltier cooler for PEC
@DmitryMyadzelets
DmitryMyadzelets / README.md
Last active November 13, 2023 12:30
Соционика - тест Гуленко

Тест Виктора В. Гуленко на принадлежность к соционическому типу

Задания для теста и ключи к ним найдены в Сети и, возможно, не имеют ничего общего с авторским тестом!

Прилагаемый файл test.json содержит:

  • 72 задания для теста
  • 8 дихотомийных признаков
  • 16 соционических типов
  • 16 названий типов по Аушре А.
  • 16 типов по MBTI
@DmitryMyadzelets
DmitryMyadzelets / udp-reverse-tunnel.md
Last active March 30, 2023 15:13
UDP Reverse Tunnel - HowTo

UDP Reverse Tunnel

How to send UDP packets from a public host to a private host behind NAT, with no port forwarding.

Install UDP reverse tunnel

https://github.com/prof7bit/udp-reverse-tunnel

Multiple UDP ports

  1. Install with a parameter instead of a fixed port
sudo make install-outside listen=%i
@DmitryMyadzelets
DmitryMyadzelets / readme.md
Last active February 3, 2023 19:21
SanDisc Clip Jam MP3 player file ordering for an audiobook

Remove all from the ID3 tag:

for f in *.mp3; do eyeD3 --remove-all "$f"; done

Given file names like name001.mp3, create new ID3 tag, and set the title to the index of the file:

for f in *.mp3; do i=`echo $f | grep -oP '\d\d\d'`; eyeD3 --to-v2.3 -t $i "$f"; done

The above scripts report the error: "No ID3 v1.x/v2.x tag found!". Ignore it.

@DmitryMyadzelets
DmitryMyadzelets / index.html
Created November 20, 2016 14:37
Routing nginx + nodejs\expressjs + socket.io
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat</title>
<script src="./socket.io/socket.io.js"></script>
<script type="text/javascript">
@DmitryMyadzelets
DmitryMyadzelets / rock64-boot.log
Last active November 5, 2021 15:53
Rock64 boot log
DDR version 1.13 20180428
[2021-11-05 16:40:18] ID:0x805 Y
[2021-11-05 16:40:18] In
[2021-11-05 16:40:18] LPDDR3
[2021-11-05 16:40:18] 786MHz
[2021-11-05 16:40:18] Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
[2021-11-05 16:40:18] ddrconfig:7
[2021-11-05 16:40:18] OUT
[2021-11-05 16:40:22]
[2021-11-05 16:40:22] U-Boot SPL 2017.09-rockchip-ayufan-1065-g95f6152134 (Aug 26 2019 - 12:40:32)