Skip to content

Instantly share code, notes, and snippets.

@tresni
tresni / gist:83b9181588c7393f6853
Last active July 7, 2024 01:05
Authy to 1Password

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 7, 2024 01:05 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@Mischa-Alff
Mischa-Alff / AABB.cpp
Last active July 7, 2024 01:03
Simple AABB implementation using SIMD instructions for x86-64
#include <chrono>
#include <ctime>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <random>
struct AABB{int32_t left, top, right, bottom;};
extern "C" bool check_aabb(AABB *a, AABB *b);
extern "C" bool check_aabb_conventional(AABB *a, AABB *b);
@vain0x
vain0x / dict_math_signs.txt
Last active July 7, 2024 01:01
数学記号辞書
|| ∨ 記号 (代替表記)
&& ∧ 記号 (代替表記)
! ¬ 記号 (代替表記)
|ー ├ 記号 (略記)
|= ⊨ 記号 (略記)
<: ⊂ 記号 (一般的でない代替表記)
<:= ⊆ 記号 (一般的でない代替表記)
:> ⊃ 記号 (一般的でない代替表記)
:>= ⊇ 記号 (一般的でない代替表記)
:: ∈ 記号 (一般的でない代替表記)
@pmonks
pmonks / deps.edn
Last active July 7, 2024 00:58
Super simple example of a Discord slash command implemented in Clojure, that provides a /echo command that simply echos its input. Uses the discljord and slash libraries.
;
; Copyright © 2024 Peter Monks
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
@hofmannsven
hofmannsven / README.md
Last active July 7, 2024 00:57
Raspberry Pi Cheatsheet
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active July 7, 2024 00:57
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@htruong
htruong / chroot-to-pi.sh
Last active July 7, 2024 00:54
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued