Skip to content

Instantly share code, notes, and snippets.

I wanted to extract my OTP secrets from Authy, so that I could install them on my preferred OTP generator. I found this gist by Indrek Ardel, based on another by Brian Hartvigsen, which were very thorough, but had out-of-date console instructions and sent your secret data through a Google QR code image-generator service. Thankfully, the general principle still works, with some simplification. Turn on developer mode for Chrome extensions and open the JS console for the Authy Chrome app's main.html, and enter:

appManager.getDecryptedApps().forEach(a => { console.log(a.name + ': ' + a.secretSeed); });

This will display the hex-encoded seed for each service that you have configured with Authy. Copy the one you want.

To generate a OTP with that seed (in hex! You don't need to convert to Base32 for oathtool, which is available in Homebrew as part of the oath-toolkit fo

@decklin
decklin / peach-backup-readme.md
Last active March 1, 2017 01:14
Using peach-backup

Using peach-backup

Hi, happy Peach-iversary, etc. I wrote this script to backup my Peach stream. To run it you have to open up Terminal and run commands; sorry! If you know me, I can help with that, otherwise find someone who can walk you through it. Everything here assumes you have a Mac. If you're on Linux, you can probably get it to work. Windows, unfortunately, I'm not sure.

Commands that you should copy from this page, one line at a time (in order!), and paste into your terminal, pressing Enter after each line, look like this:

echo "This is a command you can run! You did it!"

You can try that one now. It should reply with the part in quotation marks.

#!/bin/sh
# -*- tab-width: 30 -*-
# list shamelessly stolen from http://unicodeemoticons.com/
selecta <<'EOF' | cut -f 1 | tr -d '\n' | tr '\a' '\n' | pbcopy
☺ smiley face
☻ smiley face
✌ V sign
☹ unhappy
♡ heart
$ set -- one 'foo bar' three
$ ruby -e 'puts ARGV.count, ARGV.last' "$@ extra"
3
three extra
$ args="$@ extra"
$ ruby -e 'puts ARGV.count, ARGV.last' "$args"
1
one foo bar three extra
$ ruby -e 'puts ARGV.count, ARGV.last' $args
5
GriffinPowerMate.registerInputPackets = function() {
// The PowerMate only sends one kind of packet, which is 6 bytes:
//
// - Byte 0: pushed (0 or 1). Updates immediately on push or release.
//
// - Byte 1: turn (signed 8-bit value). +1 or -1 for every 3 degrees
// or so of rotation. May require turning a few degrees before you
// get to the next "tick" (there are no physical detents; the motion
// is very smooth). If you turn very quickly, a single packet will
// be sent with value of greater magnitude (2 ticks = -2 or +2, etc;
On firefox 29 and 30 visitors to our site secure.actblue.com are seeing this error:
##########
Secure Connection Failed
An error occurred during a connection to secure.actblue.com. The OCSP server found the request to be corrupted or improperly formed. (Error code: sec_error_ocsp_malformed_request)
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
##########
#!/bin/sh
today="$(date +%F)"
for f in followers friends; do
case "$f" in
followers) q='.users[].screen_name';;
friends) q='.users[] | .screen_name + "\t" + .name';;
esac
twitpull -v "/$f/list?count=200" "$q" > "$f.$today"
wc -l "$f.$today"

Disc 1: intro, ceremony, cocktail hour [79:50]

  1. Oval - Do While ⌘ X [4:50]
  2. Brian Eno & Cockpit Ensemble - Fullness of Wind [9:57]
  3. Alberto Iglesias - Ya No te Oye [2:37]
  4. The xx - Angels [2:17]
  5. Peter Bjorn & John - Objects of my Affection [4:50]
  6. Beach House - Lover of Mine [3:24]
  7. Sunday Brunch - Midsummer Night [5:56]
  8. Mos Def - Umi Said [4:23]
  9. Pepe Bradock - Deep Burnt [4:51]
$ dig 20D35B617C9C5689815C82D2A19584BA.playpen3.abdemo.com.
; <<>> DiG 9.8.3-P1 <<>> 20D35B617C9C5689815C82D2A19584BA.playpen3.abdemo.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4574
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;20D35B617C9C5689815C82D2A19584BA.playpen3.abdemo.com. IN A
.promoted-account, .promoted-trend {
display: none !important;
}
.global-nav-inner > .container, #page-outer > .wrapper {
width: inherit !important;
}
.content-main {
float: none !important;
width: inherit !important;
margin-left: 315px !important;