Skip to content

Instantly share code, notes, and snippets.

View edwlarkey's full-sized avatar

Edward Larkey edwlarkey

View GitHub Profile
@kgriffs
kgriffs / string_util.lua
Created May 27, 2020 17:41
Lua string utilities (contains, startswith, endswith, replace, insert)
function string:contains(sub)
return self:find(sub, 1, true) ~= nil
end
function string:startswith(start)
return self:sub(1, #start) == start
end
function string:endswith(ending)
@GGalizzi
GGalizzi / viduploadtest.go
Created December 14, 2016 09:35
multipart upload golang
package main
import (
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
@htp
htp / curl-websocket.sh
Last active March 3, 2024 20:01
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/

Generating Authy passwords on other authenticators


Update 04.04.2020: Please take a look at many of the forks of this gist or comments, where people have updated or improved upon the code. I have not needed this in a long time, which is why the original document has not been updated and the code probably does not work. Stay secure and only copy and paste code that you trust.

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 (beware, thro