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
#!/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:
@iainlane
iainlane / release_ge.sh
Created November 9, 2020 17:41
release_ge shell
#!/bin/sh
distro-info --all | mawk "
/^$1\$/ { l = NR };
/^$2\$/ { r = NR };
END {
if (!l) {
print \"Unknown release $1\" > \"/dev/stderr\";
exit 1;
#!/usr/bin/python3
# Copyright (C) 2020 Canonical Ltd.
# 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; version 3
# 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
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
#include <stdio.h>
#include <sys/capability.h>
#include <sys/types.h>
#include <unistd.h>
int
main ()
{
pid_t pid;
cap_t caps;
#!/usr/bin/python3
from collections import defaultdict
import lzma
import os
import pprint
import yaml
NEW = "update_excuses_new.yaml.xz"
OLD = "update_excuses_old.yaml"