Skip to content

Instantly share code, notes, and snippets.

View mttjohnson's full-sized avatar

Matt Johnson mttjohnson

View GitHub Profile
@mttjohnson
mttjohnson / AuthyToOtherAuthenticator.md
Created November 16, 2020 20:27 — 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

@mttjohnson
mttjohnson / dangerous_functions.php
Created March 6, 2019 22:35 — forked from perryholden/dangerous_functions.php
Test File or Folder for Dangerous PHP Functions
<?php
/**
* dangerous_functions.php
* Perry Holden <perry.holden@gmail.com>
*
* Usage: php dangerous_functions.php [type: folder|file] [folder_or_filename]
* Example: php dangerous_functions.php folder vendor/businessname/module-name
*/
if (!isset($argv[1])) {
@mttjohnson
mttjohnson / load_all_sitemap_urls.sh
Created March 1, 2019 20:10 — forked from erikhansen/load_all_sitemap_urls.sh
Load all urls from a sitemap.xml file
#!/bin/bash
# This script crawls all urls in a /sitemap.xml file and loads them, effectively priming the cache
# Usage: ./warm_cache.sh www.example.com
time wget --quiet https://$1/sitemap.xml --output-document - | \
egrep -o "https?://[^<]+" | \
grep $1 | \
grep -v "jpg" | \
xargs -i -d '\n' curl --output /dev/null --silent --write-out '%{http_code} %{time_total}ms %{url_effective} \n' {}
@mttjohnson
mttjohnson / info.php
Last active May 20, 2019 21:14 — forked from davidalger/phpinfo.php
PHP Info (phpinfo) - With header to bypass varnish caching
<?php
header('Cache-Control: private');
phpinfo();
@mttjohnson
mttjohnson / n.sh
Last active February 25, 2020 10:05 — forked from dagelf/n.sh
Linux network interface throughput speed
#!/bin/sh
# Forked from https://gist.github.com/dagelf/ab2bad26ce96fa8d79b0834cd8cab549
# With modifications for including timestamp and reporting in Megabits/s instead of Kilobytes/s
#
# To run: ./n.sh em1
SLP=60 # display / sleep interval
DEVICE=$1
IS_GOOD=0
for GOOD_DEVICE in `grep \: /proc/net/dev | awk -F: '{print $1}'`; do