Skip to content

Instantly share code, notes, and snippets.

@davesteele
davesteele / rc.local
Last active September 7, 2023 18:42
Implement a Pi Keyboard Jiggler using pizero-usb-hid-keyboard
#!/usr/bin/env bash
/home/pi/pizero-usb-hid-keyboard/rpi-hid.sh
chmod 777 /dev/hidg0
/home/pi/tickle.py &
exit 0
@mapster
mapster / Readme.md
Last active April 8, 2025 09:48
Export Google Authenticator secret OTP-keys

Export Google Authenticator secret OTP-keys

I recently got myself a Yubikey and wanted to set up the Yubico Authenticator with all the OTPs I had in Google Authenticator. Unfortunately Yubico Authenticator doesn't support scanning the QR-code that the Google Authenticator generates when you export the OTP-keys, and it seemed like quite the daunting task to log in to every service to generate new OTP-keys. So I decided to have a look at the contents of the QR code, to see if I could import the keys into Yubico Authenticator in one go. Luckily I found a blog post by Alex Bakker that describes the data format.

Transfer QR-code to computer

Unfortunately, but likely for the best, the security policy of Google Authenticator won't allow you to take a screenshot of

How to use this?

  1. Install the USB drivers for your device (Google has a list of some universal USB drivers here)
  2. Download the ADB binary for your particular OS (Windows, Mac, Linux)
  3. Extract the zip file into a folder that you can quickly access.
  4. On your phone, go to Settings and tap on About Phone. Find the Build Number and tap on it 7 times to enable Developer Options.
  5. Now enter Developer Options and find USB Debugging. Enable it.
  6. On your computer, browse to the directory where you extracted the ADB binary.
  7. Launch a Command Prompt in your ADB folder. For Windows users, this can be done by holding Shift and Right-clicking then selecting the “open command prompt here” option.
  8. Once you’re in the command
@deyixtan
deyixtan / sublime_text_patch.md
Last active July 26, 2024 10:35
Sublime Text Patching Guide

Automated Patching

Download slt.py python script (supports multiple build) from this repository.

Usage

python slt.py <"sublime_text file path">


Manual Patching

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: