Skip to content

Instantly share code, notes, and snippets.

View hober's full-sized avatar
🏳️‍⚧️
Putting the L and T in LGBT

Theresa O'Connor hober

🏳️‍⚧️
Putting the L and T in LGBT
View GitHub Profile
(defun tess-mangle-gmane-archival-gnus-data (link)
"Mangle the `gnus-data' property value LINK.
Specifically, change the archival URL from permalink.gmane.org (Gmane's
blog-like interface) to article.gmane.org (Gmane's newslike interface)."
(let ((original-date (get-text-property 5 'original-date link))
(face (get-text-property 5 'face link)))
(propertize (replace-regexp-in-string "permalink.gmane.org"
"article.gmane.org"
(substring-no-properties link))
'face face 'original-date original-date)))

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@hober
hober / audiopub-atom-strawman.atom
Created April 3, 2019 17:56
Strawman example of representing an audiobook's manifest in Atom (RFC 4287)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<id>tag:example.com,2019-04-01:flatland</id>
<title>Flatland: A Romance of Many Dimensions</title>
<author><name>Edwin Abbott Abbott</name></author>
<contributor><name>Ruth Golding</name></contributor>
<updated>2019-04-01T12:30:02Z</updated>
<published>2019-04-01T12:30:02Z</published>
<rights type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
@hober
hober / I don't understand python type annotations.py
Last active February 25, 2023 18:40
I don't understand why mypy likes this code but doesn't like the previous revision of this gist.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from dataclasses import dataclass
from typing import Optional, Protocol, TypeVar
class ProtoA(Protocol):
def a(self) -> None:
...