Skip to content

Instantly share code, notes, and snippets.

miketheman / Makefile
Created Nov 22, 2021
Makefile with targets to generate static renderings from PlantUML sources
View Makefile
DIAGRAMS := $(wildcard *.puml */*puml)
SVGS := $(DIAGRAMS:.puml=.svg)
PNGS := $(DIAGRAMS:.puml=.png)
all: $(SVGS) $(PNGS)
%.png: %.puml
plantuml -tpng "$<"
%.svg: %.puml
miketheman /
Last active Mar 20, 2021 — forked from benkehoe/
Single sourcing a python package version using importlib.metadata.version()
# importlib.metadata is present in Python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# use the shim package importlib-metadata pre-3.8
import importlib_metadata as importlib_metadata
__version__ = importlib_metadata.version(__package__ or __name__)
except importlib_metadata.PackageNotFoundError:
View hypermail.rb
class Hypermail < Formula
desc "Hypermail is a free (GPL) program to convert email from Unix mbox format to html."
homepage ""
url ""
sha256 "f97995b9bb1ece888968467cdad05e3daa7662ff3e3a5739e378b4f3adeb26c6"
license "GPL-2.0"
depends_on "bison" => :build
depends_on "gcc"
View main.dart
flip(inputInt) {
return inputInt = 1 - inputInt;
void main() {
miketheman /
Last active Jun 4, 2020
Mike's Super Janky Manual GitHub Vuln Alert Query

How To


  • GitHub account with admin-level rights to repos, possibly even org-level admin.
  • Command Line familiarity
  • jq tool

Note: Commands have been written assuming a macOS machine, they may work on other platforms, but I haven't tested those.

miketheman /
Created Feb 14, 2020
A simple script to enable GitHub's Data Services & Vulnerability Scanning on a given Organization's Repositories
from github import Github
org = gh.get_organization('SET_ORG_NAME_HERE')
repos = org.get_repos()
for repo in repos:
if repo.archived:
miketheman / main.dart
Last active Jan 18, 2020
round duration to closer second, for a countdown clock -
View main.dart
void main() {
Duration duration = new Duration(minutes: 1, seconds: 59, milliseconds: 99);
// Rounds Duration to seconds based on milliseconds
// This is semi-equivalent to a non-existing `Duration.ceil(milliseconds)`
Duration secondRounder(Duration duration) {
int roundedDuration;
miketheman /
Last active Sep 2, 2018
Datadog Agent 5.x Service on Raspberry Pi
DD_API_KEY=<REPLACE> sh -c "$(curl -L"
sudo mkdir /opt/datadog-agent
sudo cp -r ~/.datadog-agent/* /opt/datadog-agent
for i in /opt/datadog-agent/venv/bin/*; do echo $i; sudo sed -i $sedcmd $i; done
miketheman / console
Created Sep 21, 2017
core/gmp multiple versions
View console
★ Install of core/readline/6.3.8/20170513213506 complete with 0 new packages installed.
guile: Resolved dependency 'core/readline' to /hab/pkgs/core/readline/6.3.8/20170513213506
guile: WARN
guile: WARN The following runtime dependencies have more than one version
guile: WARN release in the full dependency chain:
guile: WARN
guile: WARN * core/gmp ( core/gmp/6.1.2/20170526062114 core/gmp/6.1.0/20170513202112 )
guile: WARN
guile: WARN The current situation usually arises when a Plan has a direct
guile: WARN dependency on one version of a package (`acme/A/7.0/20160101200001`)
miketheman /
Created Dec 25, 2016
Crystal Lang 0.20.3 Socket::IPAddress change
$ crystal --version
Crystal 0.20.1 (2016-12-05)
$ crystal run
1482659875.246: "This is only a test."
$ crystal --version
Crystal 0.20.3 (2016-12-23)
$ crystal run
Error in wrong number of arguments for '' (given 3, expected 2)
Overloads are: