Skip to content

Instantly share code, notes, and snippets.

dkess /
Last active Sep 6, 2020
zero-dependency python script to send a message to a matrix room
#!/usr/bin/env python3
Take a message on stdin and send it to a Matrix room.
Works on Python 3.5+
echo 'hello world' | --homeserver --access-token-file /path/to/accesstoken --room '!'
dkess /
Created Apr 25, 2020
dkess's recovery script
# gpg -o env -d env.gpg
# sudo systemd-run -p DynamicUser=1 -p PrivateTmp=1 --working-directory=/tmp --setenv=HOME=/tmp -p EnvironmentFile="$(realpath recovery.env)" --pty --wait --service-type=exec
set -euo pipefail
export GPG_TTY=$(tty)
gpg --import /dev/stdin <<< "$GPGKEY"
unset GPGKEY
View i3status.toml
#theme = "solarized-dark"
theme = "gruvbox-dark"
icons = "awesome"
block = "music"
buttons = ["prev", "next"]
max_width = 50
View gist:3c2585088276b55b2bc7f329b93d3b29
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
# i3 config file (v4)
# Please see for a complete reference!
dkess /
Created Jun 29, 2018
Implementation of Discourse's SSO in Python Flask
# Implementation of Discourse's SSO in Python Flask.
# Assumes username is passed as 'X-WEBAUTH-USER' HTTP header
import base64
import binascii
import hashlib
import hmac
import urllib.parse
from flask import abort, Flask, redirect, request

Keybase proof

I hereby claim:

  • I am dkess on github.
  • I am dkess ( on keybase.
  • I have a public key ASD6tPuAwA-qOEpyjybvyxgjIuuvpwYsh8hKPhZjA9ZrZwo

To claim this, I am signing this object: