Skip to content

Instantly share code, notes, and snippets.

View hahanein's full-sized avatar

Benjamin Westphal hahanein

View GitHub Profile
@hahanein
hahanein / index.html
Last active May 31, 2025 09:16
An HTML standard template
<!doctype html>
<html>
<head>
<title>An HTML standard template</title>
<meta charset="utf-8" />
</head>
<body>
<p>… Your HTML content here …</p>
</body>
@hahanein
hahanein / bsky-grep.go
Created May 24, 2025 11:59
Stream and grep a Bluesky user's feed for posts matching a regex
// Command bluesky authenticates against the atproto service, walks an
// author's feed in *streaming* fashion, and prints every post whose text
// matches a user‑supplied regular expression.
//
// Flags
//
// -username your Bluesky handle (required)
// -password your Bluesky password (required)
// -other the handle whose feed you want to inspect (required)
// -pattern a regular expression for matching post text (default "(?i)golang")
@hahanein
hahanein / swaybat.service
Last active July 21, 2024 11:11
Present a battery alarm banner in sway and shutdown computer if battery is lower than 2 percent
[Unit]
Description=Sway battery alarm
[Service]
ExecStart="/usr/bin/dash" "/usr/bin/swaybat"