Skip to content

Instantly share code, notes, and snippets.

View n-WN's full-sized avatar
:shipit:
~DevSecOps~ AI infra

Zoee n-WN

:shipit:
~DevSecOps~ AI infra
View GitHub Profile
@n-WN
n-WN / AuthyToOtherAuthenticator.md
Created July 11, 2025 19:46 — forked from gboudreau/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.

@n-WN
n-WN / mi_flash_all_platform.sh
Created April 28, 2025 07:02
mi_flash_all_platform
#!/bin/bash
# 检查产品是否匹配
fastboot getvar product 2>&1 | grep -E "^product: *gauguin" || { echo "Mismatch image and device"; exit 1; }
# 刷写镜像
fastboot flash super "$(dirname "$0")/images/super.img" || { echo "Flash super error"; exit 1; }
fastboot flash cust "$(dirname "$0")/images/cust.img" || { echo "Flash cust error"; exit 1; }
# 擦除和刷写其他镜像
#/bin/bash
declare -a remote_dirs=("sdcard/inshot/"
"sdcard/DCIM/"
"sdcard/Pictures/"
"sdcard/Download"
"sdcard/Movies/")
bak=bak_$(date +"%Y%m%d-%H%M%S")
for dir in "${remote_dirs[@]}"
@n-WN
n-WN / push_commits_by_chunks.sh
Created February 2, 2022 15:09 — forked from Sacristan/push_commits_by_chunks.sh
Push commits by chunks
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# check if the branch exists on the remote
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# # if so, only push the commits that are not on the remote already
# range=$REMOTE/$BRANCH..HEAD
# else
# # else push all the commits