Skip to content

Instantly share code, notes, and snippets.

View iainlane's full-sized avatar
🔫
gg nextmap

Iain Lane iainlane

🔫
gg nextmap
View GitHub Profile
@iainlane
iainlane / iain.md
Last active January 25, 2025 10:57
graph TD
    %% Legend as a subgraph
    subgraph Legend["Legend"]
        direction LR
        L1["Hebrew Origin"]
        L2["Irish Forms"]
        L3["Scots Forms"]
        L4["Historical Forms"]
        L5["Diminutives"]
#!/usr/bin/env python3
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from dateutil import parser
# Custom date parser
def custom_date_parser(date_string):
date_string = date_string.split(" ")[0] + " " + date_string.split(" ")[1]
#!/usr/bin/env bash
# Usage: retry <num-retries> <command> [arguments]
function retry {
local retries=$1
shift
local cmd=("$@")
case "${retries}" in
'' | *[!0-9]*)
// wait-for-github-pr
// Copyright (C) 2022, Grafana Labs
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU Affero General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version.
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
#!/bin/bash
set -euo pipefail
usage() {
echo "$0 [owner] [repo] [sha]" >&2
}
if [ "${GITHUB_TOKEN:-}" = "" ]; then
usage
#!/bin/bash
set -e
set -x
vop=/opt/vyatta/bin/vyatta-op-cmd-wrapper
vcfg=/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper
# Hostnames to look up
#!/usr/bin/python3
import apt
import apt_pkg
def list_esm_package_updates():
""" Find updates which you can install if you enable ESM. """
cache: apt.Cache = apt.Cache()
#!/usr/bin/python3
# Copyright 2021 Canonical Ltd
""" Update all gnome-team repositories to use the given webhooks.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
#!/usr/bin/python3
import lzma
import urllib.request
import yaml
SERIES = "hirsute"
URL = "https://people.canonical.com/~ubuntu-archive/proposed-migration/update_excuses.yaml.xz"
#!/usr/bin/python3
import sys
from gi.repository import Gio, GLib, GObject
SYSTEM_BUS = Gio.bus_get_sync(Gio.BusType.SYSTEM)
class SystemdUnitWatcher: