Skip to content

Instantly share code, notes, and snippets.


Ben List listba

View GitHub Profile
Igosuki / ws.scala
Last active Dec 20, 2021
http4s fs2 websocket
View ws.scala
abstract class UserWSEndpoint[F[+ _]: Timer: Concurrent: ContextShift](
broadcastTopic: Topic[F, PushNotification])(implicit F: ConcurrentEffect[F])
extends Http4sDsl[F]
with Loggable {
def broadcast(e: PushNotification) = broadcastTopic.publish1(e)
def toText[A: Encoder](a: A)(implicit e: Encoder[A], wse: Encoder[WSMessage]) =
Text(wse(WSMessage("", "", e(a).some, "", "".some)).asString.get)

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

bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm