Skip to content

Instantly share code, notes, and snippets.

@miklosbagi
miklosbagi / robo-root-xore.sh
Created December 8, 2020 16:49
Xiaomi Roborock rootpw decrypt (UART)
#!/bin/bash
[ -z "$1" ] && { echo "Give me the Xiaomi string (e.g. ZNDRTERCGVDD@XES)"; exit 1; }
key="55"; d=""; hex=`echo -n "$1" | od -An -tuC`
for c in $hex; do xor=$(($c^$key)); printf "\\$(printf '%03o' "$xor")"; done; echo
@jesugmz
jesugmz / multi-cloud-docker-swarm.md
Last active September 14, 2024 15:51
Create a simple multi cloud Docker cluster using Docker Swarm, Docker Machine and the three top cloud providers nowadays - Google Compute Engine, Microsoft Azure and AWS

Simple multi cloud Docker cluster using Docker Swarm

This guide explains how to create a simple multi cloud Docker cluster using Docker Swarm, Docker Machine and the three top cloud providers nowadays - Google Compute Engine, Microsoft Azure and AWS.

Prerequisites

This guide assumes you have a Linux host with Docker CE installed. If you are using Docker for Mac or Docker for Windows you can avoid the Docker Machine set up since it comes included.

Install Docker Machine

@jesugmz
jesugmz / check-connectivity-different-hosts-specific-port.md
Last active August 21, 2018 22:48
Check if there is connectivity between different hosts through a specific port

nc -zv

@tomasinouk
tomasinouk / reset_poe_smartflex.sh
Created March 28, 2018 04:06
Reset PoE if ping fails on SmartFlex - PoE unit
# created by Tomas Blaha - Dureco
# script check camera IP via ping every 30s
# if cannot ping it turn Off/On PoE for this camera only
# it does not cycle PoE on second PoE port
CAMERA_PING=192.168.1.22
while true
do
ping -c 1 $CAMERA_PING
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 24, 2025 05:26 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.