Skip to content

Instantly share code, notes, and snippets.

View haykinson's full-sized avatar

Ilya Haykinson haykinson

View GitHub Profile
@haykinson
haykinson / webfinger-in-nginx.md
Last active April 11, 2023 06:33
setting up nginx for webfinger

So, you want to use username@personaldomain.example as a Mastodon profile, but don't want to run an instance with a single user? Webfinger to the rescue! If you run your own web server, or have control over it, you can set up a webfinger implementation that should transparently work with Mastodon to let people follow you regardless of which instance you're actually on.

For a great guide to doing this for Apache, please see Erik's post. This guide is about doing the same for nginx.

First, make sure that you have the nginx javascript module (njs) installed. We need the javascript module in order to be able to easily extract a urldecoded query string parameter. On Ubuntu this is a matter of running:

# apt-get install nginx-module-njs

Keybase proof

I hereby claim:

  • I am haykinson on github.
  • I am ilyahaykinson (https://keybase.io/ilyahaykinson) on keybase.
  • I have a public key ASCXvkl9gq8aohZUOfTPkB8AvQoVLcPv9zIRUsvNkTKmEQo

To claim this, I am signing this object:

from bluepy import btle
import struct
import time
import traceback
from datetime import datetime
from twilio.rest import TwilioRestClient
UUID = "a495ff20-c5b1-4b44-b512-1370f02d74de"
DEVICE = "D0:39:72:CD:31:EE"