Creating a Matrix bridge involves connecting the Matrix ecosystem with another chat service, enabling users to communicate across different platforms. In this guide, we'll develop a simple Matrix bridge using Python 3.12 and the Matrix Application Service (AppService) API with Synapse.
GitHub Projects Beta aka GitHub Projects Next aka GitHub ProjectNext is now known as GitHub ProjectV2 in the API.
It's not immediately obvious how to use the new API, especially if you're coming from the old beta API.
You no longer need to set the HTTP header: GraphQL-Features: projects_next_graphql.
You still need to add your GitHub personal access token to the Authorization header, e.g. Authorization: Basic ghp_...
I use pandoc to convert masses of Word documents to markdown. Still working on a generic script, but for now here's the "gist" of what I type into the terminal:
$ myfilename="example"
$ pandoc \
-t markdown_strict \
--extract-media='./attachments/$myfilename' \
$myfilename.docx \I've since moved the tutorial over to my website. Clarified some of the wording, added exercises at the end, added links to useful resources.
For historical reasons, I'm keeping the original text here. But if you've just stumbled upon this tutorial for the first time, you may want to check out the revised version!
https://riki.house/programming/lua/classes
| DROP FUNCTION IF EXISTS synapse_clean_redacted_messages(); | |
| CREATE FUNCTION synapse_clean_redacted_messages() | |
| RETURNS void AS $$ | |
| DECLARE | |
| BEGIN | |
| UPDATE events SET content = '{}' FROM redactions AS rdc | |
| WHERE events.event_id = rdc.redacts | |
| AND (events.type = 'm.room.encrypted' OR events.type = 'm.room.message'); | |
| END; | |
| $$ LANGUAGE 'plpgsql'; |
sudo install -Dm644 restic@.service /etc/systemd/system/.- For each target:
- Place the options (exclude, etc) and paths in the variable
BACKUP_OPTIONS="..."in/etc/restic/TARGET/config. Newlines can be escaped with backslashes. - Place the repository path in
/etc/restic/TARGET/repository. - Place the repository password in
/etc/restic/TARGET/password.
- Place the options (exclude, etc) and paths in the variable
- To run the backups on a schedule, create a
.timerfile in/etc/systemd/system/based onrestic.timer.example, set the schedule and target unit, thensystemctl enable --now whatever.timer. - To run the backups manually, just
systemctl startit.
| fastboot flash product product.img | |
| fastboot flash abl abl.img | |
| fastboot flash aop aop.img | |
| fastboot flash bluetooth bluetooth.img | |
| fastboot flash boot boot.img | |
| fastboot flash cmnlib cmnlib.img | |
| fastboot flash cmnlib64 cmnlib64.img | |
| fastboot flash devcfg devcfg.img | |
| fastboot flash dsp dsp.img | |
| fastboot flash dtbo dtbo.img |
| " Location for installing plugins | |
| call plug#begin('~/.vim/plugged') | |
| " Other plugins are specified with user/repo on Github or x.vim on vimscripts | |
| " Git integration (status bar and commands like Gblame) | |
| Plug 'tpope/vim-fugitive' | |
| " Add info to sidebar about git | |
| Plug 'airblade/vim-gitgutter' | |
| " Add file-management commands like :Delete, :Move, and :Rename | |
| Plug 'tpope/vim-eunuch' |
| #!/usr/bin/env bash | |
| # Little script to play a music/sound on pomodoros through headphones and call to come back to work through HDMI speakers. | |
| # set -euo pipefail # Unofficial bash strict mode | |
| # Prerequsitres: gtts (`pip install --user --upgrade gtts`, mpv (`flatpak install io.mpv.Mpv`), vlc, libsox-fmt-mp3 and retry. | |
| # Also use yt-dlp instead of yt-dl https://hund.tty1.se/2021/10/12/how-to-use-yt-dlp-instead-of-yt-dl-with-mpv.html | |
| # TODO/Known bugs: | |
| # - Fix issue with PipeWire: pacmd stat No PulseAudio daemon running, or not running as session daemon. https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/357 |