Skip to content

Instantly share code, notes, and snippets.

View brandongalbraith's full-sized avatar

B brandongalbraith

  • North America
View GitHub Profile

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

@brandongalbraith
brandongalbraith / gist:623458b040cfc6b34d6629e00f82733f
Created December 10, 2020 18:19
NWS/National Weather Service Hostnames To Have Request Limits Instituted
# See https://www.weather.gov/media/notification/pdf2/pns20-85ncep_web_access.pdf for context
nomads.ncep.noaa.gov
ftp.ncep.noaa.gov
www.ftp.ncep.noaa.gov
ftpprd.ncep.noaa.gov
mag.ncep.noaa.gov
tgftp.nws.noaa.gov
aviationweather.gov
weather.gov
# gem install crack rest-client fastercsv
require 'rubygems'
require 'crack'
require 'rest_client'
require 'fastercsv'
# To use, get an access token here, by clicking "get access token"
# and checking user.groups in the dialog box
# https://developers.facebook.com/tools/explorer?method=GET&path=209024949216061%2Ffeed
#
@brandongalbraith
brandongalbraith / SelfService-AWSBillingReadOnly.json
Created September 16, 2020 19:33
Enable AWS Billing, Budget, Cost & Usage Reporting Read Only Access to IAM Users
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"aws-portal:View*",
"budgets:View*",
"cur:Describe*",
"purchase-orders:View*"
@brandongalbraith
brandongalbraith / youtube-ls-playlist.sh
Created July 16, 2020 17:48 — forked from zmwangx/youtube-ls-playlist.sh
List video URIs in a YouTube playlist.
#!/usr/bin/env bash
# Takes a YouTube URI to a playlist (fairly liberal, it's fine as long
# as the playlist id can be extracted), and prints a list of URIs in a
# YouTube playlist.
#
# Requires youtube-dl 2014.10.24, tested on youtube-dl
# 2014.11.02.1. Feature subject to change.
youtube-dl -j --flat-playlist "$1" | jq -r '.id' | sed 's_^_https://youtube.com/v/_'
@brandongalbraith
brandongalbraith / url-create.sh
Created May 22, 2020 14:59
Create a .url file on MacOS
# Source: https://superuser.com/questions/689441/how-do-i-create-a-url-file-on-os-x
#!/bin/bash
if [[ $# -le 1 || $# -ge 3 ]] ; then
echo Usage: $0 '<namefile> <url>'
echo
echo Creates '<namefile>.url'.
echo Openning '<namefile>.url' in Finder, under OSX, will open '<url>' in the default browser.
exit 1
fi
@brandongalbraith
brandongalbraith / template.sh
Last active April 16, 2020 16:09
So You're Writing Some Bash #bash
#! /usr/bin/env bash
set -euo pipefail
#!/usr/bin/env ruby
# you must have SoX installed to generate touch tones
# brew install sox
# also, whatever application you run this script from will need to be authorized
# to control your computer, via System Preferences > Privacy > Accessibility
# finally, don't run this with headphones plugged in :)
@brandongalbraith
brandongalbraith / gist:1726b3aec837b3edb025d1f36ff99828
Created November 14, 2019 17:11 — forked from chanks/gist:7585810
Turning PostgreSQL into a queue serving 10,000 jobs per second

Turning PostgreSQL into a queue serving 10,000 jobs per second

RDBMS-based job queues have been criticized recently for being unable to handle heavy loads. And they deserve it, to some extent, because the queries used to safely lock a job have been pretty hairy. SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.

On top of that, they have to actually update the row to mark it as locked, so the rest of your workers are sitting there waiting while one of them propagates its lock to disk (and the disks of however many servers you're replicating to). QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.

So, many developers have started going straight t

to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,