Skip to content

Instantly share code, notes, and snippets.

View jwodder's full-sized avatar

John T. Wodder II jwodder

  • A well house for a large spring
  • 19:20 (UTC -04:00)
View GitHub Profile
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.8"
# dependencies = ["ghrepo", "httpx"]
# ///
"""
This script downloads all the assets for one or more releases of a given GitHub
repository in parallel; see the --help output for details. It serves as an
example of asynchronous programming in Python, written to accompany the article
@jwodder
jwodder / ua.md
Last active April 8, 2024 11:49
D&D 5e Unearthed Arcana Index

D&D 5e Unearthed Arcana Index

Because finding anything in this page is harder than it should be

Date Article Contents
2015-02-02 Unearthed Arcana: Eberron [PDF] Changelings, shifters, warforged, Wizard (Artificer), rules for action points, dragonmarks
@jwodder
jwodder / forklone.py
Last active October 17, 2023 21:06
forklone.py — Fork & clone a GitHub repository
#!/usr/bin/env python3
# NOTICE: Development has continued at <https://github.com/jwodder/forklone>
# The MIT License (MIT)
#
# Copyright (c) 2020-2021, 2023 John Thorvald Wodder II
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@jwodder
jwodder / apt-check.py
Last active January 24, 2023 04:16
Display a table of available APT package updates
#!/usr/bin/python3
"""
This script lists all APT package updates currently available for your system
along with the version numbers of the old & new packages. It is derived from
``/usr/lib/update-notifier/apt-check`` in the ``update-notifier-common``
package on Ubuntu 14.04 (Trusty Tahr) and is made available under the same
license (the GNU GPL v2).
This script is know to work on Ubuntu Trusty and Xenial, and it should work on
any recent version of Ubuntu with the ``python3-apt`` package installed.
@jwodder
jwodder / print256colours.py
Last active November 2, 2021 02:38 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/usr/bin/env python3
import argparse
from dataclasses import dataclass
from typing import Optional
# John Thorvald Wodder II, 2016-2021.
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
<!-- pygmentize -f html -O full,style=colorful -o code.html code.py -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2020 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
@jwodder
jwodder / click-config.rst
Last active August 13, 2020 22:36
Setting Default Option Values from Config Files with Click
@jwodder
jwodder / unicode-latex.rst
Last active August 13, 2020 22:35
Unicode and LaTeX
@jwodder
jwodder / rst-hyperlinks.rst
Last active August 13, 2020 22:30
All About reStructuredText Hyperlinks
@jwodder
jwodder / pyproject.toml
Last active October 12, 2018 20:56
An MCVE for a bug in tox
[build-system]
requires = [
"read_version ~= 0.1.0",
"setuptools >= 34.4.0",
"wheel"
]
build-backend = "setuptools.build_meta"