Skip to content

Instantly share code, notes, and snippets.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 12, 2025 11:23 — 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.

// ==UserScript==
// @name FloatingScrollbar.uc.js
// @namespace [email protected]
// @include main
// @version 0.0.3
// @note Thanks to Griever(https://github.com/Griever/userChromeJS/blob/master/SmartScrollbar.uc.js) and Paul Rouget(https://gist.github.com/4003205)
// @note...........0.0.3 Fixed a problem of breaking hbox layout
// @note 0.0.2 Remove usage of E4X (https://bugzilla.mozilla.org/show_bug.cgi?id=788293)
// ==/UserScript==
@hjbotha
hjbotha / free_ports.sh
Last active May 4, 2025 18:00
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@dcode
dcode / import_dod_certs_mac.sh
Last active May 14, 2025 05:06
Install and trust DoD CA certificates on Mac OS X. Tested on Catalina and Mojave. *NOTE*: This should also enable CAC if you didn't override the system drivers.
#!/bin/bash
set -eu -o pipefail
export CERT_URL='https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip'
# Download & Extract DoD root certificates
cd ~/Downloads/ || exit 1
/usr/bin/curl -LOJ "${CERT_URL}"
@bestrocker221
bestrocker221 / freeradius_password_hash_sha256_salt.py
Created March 17, 2019 18:01
SSHA2-256 FreeRadius password hashing
from hashlib import sha256
from base64 import b64encode, b64decode
# salt size = 12
SALT_SIZE = 12
def hashPassword(password, salt):
ctx = sha256(password)
ctx.update(salt)
// ==UserScript==
// @name 新しいスクリプト 421815
// @version 1
// @match https://wiki.greasespot.net/GM.xmlHttpRequest
// @match http://example.com/
// @grant GM.xmlHttpRequest
// ==/UserScript==
function get(url) {
return new Promise(resolve => {
@MrOtherGuy
MrOtherGuy / fx-css-variables.txt
Last active March 15, 2025 19:46
CSS variables used by Firefox
main-window
***********************
--arrowpanel-background
--arrowpanel-border-color
--arrowpanel-color
--arrowpanel-dimmed
--arrowpanel-dimmed-even-further
--arrowpanel-dimmed-further
--arrowpanel-padding
--autocomplete-popup-background
@Snarp
Snarp / google-docs-copy.js
Last active May 6, 2025 16:15
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@huytd
huytd / todo.vim
Created June 14, 2020 07:34
A Todo list syntax in Vim, with an actual checkbox
" Vim syntax file
" Language: Todo
" Maintainer: Huy Tran
" Latest Revision: 14 June 2020
if exists("b:current_syntax")
finish
endif
" Custom conceal

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}