Skip to content

Instantly share code, notes, and snippets.

@jdormit
jdormit / MATRIX.md
Created February 5, 2019 02:57 — forked from fstab/MATRIX.md
How to use matrix.org and vector.im as an IRC client

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

A new kind of social network

There’s a new social network in town. It’s called Mastodon. You might have even heard of it. On the surface, Mastodon feels a lot like Twitter: you post “toots” up to 500 characters; you follow other users who say interesting things; you can favorite a toot or re-post it to your own followers. But Mastodon is different from Twitter in some fundamental ways. It offers many more ways for users to control the posts they see. It fosters awareness of the effect your posts have on others through a content warning system and encourages accessibility with captioned images. At its core, though, there’s a more fundamental difference from existing social networks: Mastodon isn’t controlled by a single corporation. Anyone can operate a Mastodon server, and users on any server can interact with users on any other Mastodon server.

This decentralized model is called federation. Email is a good analogy here: I can have a Gmail account and you can have an Outlook

@jdormit
jdormit / wordpress-activitypub.org
Last active March 12, 2022 04:23
Notes about an ActivityPub implementation for Wordpress

Technical details

The plugin will do two things: set up an ActivityPub server running on the Wordpress instance, and transform the Wordpress web interface (both admin and public, e.g. comments) into an ActivityPub client.

Objects and collections

I want to offload as much of the object storage as possible to existing Wordpress capabilities. This means that instead of storing separate objects for blog posts, comments, users, etc., the server translates the data already in the WP database to the correct JSON representation on-demand when it needs to interact with these objects. However, there may be some additional metadata that the server needs to associate with the existing representations, which can be done using linking tables (post_id -> recipients, etc.).

Collections (inboxes, outboxes, likes, follows, etc.) will probably need to have their own tables in the DB, since there’s not an obvious analog to these in classic WP.

I want the object created by the plugin to be compatible with Mastodon, whic

Keybase proof

I hereby claim:

  • I am jdormit on github.
  • I am jdormit (https://keybase.io/jdormit) on keybase.
  • I have a public key ASCdXY1cKOZLvr2NM3A8KtZ4Qq1e6Gq8WXRw_W3Dl3s9Lgo

To claim this, I am signing this object:

@jdormit
jdormit / jdormitzer@hubspot.public.key
Last active June 28, 2017 17:42
Public gpg key for jdormitzer@hubspot.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFlT6hgBEACeiRXpTaQH5TMaODUc9aiqUyrBoZFDEtYnjNOjy/+XqIFuoWLm
aVIdP4cADnmaiWizVosRIcJxqtnePNvgApnwRW1KTuUnwPpCa20xUTm0pdWQUG21
t8y7aJ1wjcnEuodGEwcVxeDyhuBCqbtO423lO4rN0Gop5Tqltk71HSF0+7pfXNbF
GKRdCGOK1VPxtMHOxP3ucm2564wfGIpyxihafYrYoLYGBj1lCkDOBcG/6ImQEgcA
5Ui8v/FMT7gQBQd+pgqdq+6WBnW3rlGBS79RQ0hastxlLvsMKbp83Mfn3p7KzCbm
vMAZpTSyhn+yRdIecOFRPcckDQsklY+pyLqb1LoCcQpr1Imo1eo/mfJMamWlJL45
Y3sR4U/qAoi0mFcAmrG9IVbHAQ4hzKN8DMWTZT+yDtdw2NhrE1padzoaiKDQiYKr
QCEXMqRfnA9HYYmTkivAaUSXrVxqLxoIXcM8zTNCUEJH/iOh6ZFiPO2iB6qkxHVh
@jdormit
jdormit / retry.sh
Last active August 23, 2023 19:55
Bash script to retry a failed command
#!/bin/bash
# Retries a command on failure.
HELP=\
"$0: $0 [flags] [options] [--] COMMAND
Runs a command, retrying if the command fails
Arguments:
COMMAND The command to run
@jdormit
jdormit / public.key
Last active October 6, 2017 18:24
Jeremy Dormitzer's public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFnWWrwBEADCKW7dGa0sCbVwPFQ1Yo/MXDzsjws4KI3+00f55/3dFWeT60Zh
YuhhpDZ5omY2V/BXODSvtMUnSEprUwawNEr4N6isKMnzi8V4tg/HQfNohxa8VhCO
EhjePoBRLE83Jhdn25E3MJszVqG856XziifaH9pwX2Gens9/XeKF7WvHgHYgnD91
oDlNOgEb9/UvXF2P3Cz7IeKzCSiLhDcmBUbwYrEOI0VaqyGQs8QrwV9fSagAmKZQ
PwYTuMtKSx1PMJZdYPUJnVeTozeZr/iJkVfIerudEJExt1eLuZhvfN6hThK683E1
RSbqQ8nktF/HzMRHxKhd92om2e+8uwBMCsbSKjHU3gyLG7knbpyyMk64YHIpO0ZU
mMprpvVpI8x9ZjcJHV6QcdoUbYkC1IxVwqvrOIRJ1d2fa5BjqBGFwPnIAD7WvDtO
b/M6P/xNVturewPHT3A9B1+vVhKm2pZ1zHFAlePG2+P8VOsMaORVCPziiOs6CY/N
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jdormit
jdormit / design-doc_link.txt
Last active January 19, 2016 00:55
CMPT 307 Project