Skip to content

Instantly share code, notes, and snippets.

View mp3cko's full-sized avatar
:shipit:

Mario Petričko mp3cko

:shipit:
View GitHub Profile
@mp3cko
mp3cko / procHandle.go
Created January 21, 2022 15:47
Get windows process handle in Go
import (
"context"
"encoding/json"
"fmt"
"os"
"os/exec"
"strings"
"syscall"
"time"
"unsafe"
@mp3cko
mp3cko / indexedDB.js
Last active September 10, 2021 20:39
JS indexedDB basics
// Basic pattern
// 1. open a database.
// 2. create an object store in the database.
// 3. start a transaction and make a request to do some database operation, like adding or retrieving data.
// 4. wait for the operation to complete by listening to the right kind of dom event.
// 5. do something with the results (which can be found on the request object).
//Init indexedDB
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
@mp3cko
mp3cko / AuthyToOtherAuthenticator.md
Created April 11, 2021 11:05 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the