Get a list of images from ghcr.io for a given project. See https://docs.github.com/en/rest/packages/packages?apiVersion=2022-11-28#list-package-versions-for-a-package-owned-by-an-organization or https://docs.github.com/en/rest/packages/packages?apiVersion=2022-11-28#list-packages-for-a-user for the URL to use for other people's container images. See https://docs.github.com/en/rest/packages/packages?apiVersion=2022-11-28#list-package-versions-for-a-package-owned-by-the-authenticated-user for your own container images. Requires the credential github_access_token
. The token needs the read:package
permission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""This forwards mail from the given mbox style mailboxes to a real email. | |
It borrows the ``haxmail.ini`` config file. | |
""" | |
from dataclasses import dataclass, field | |
from typing import Annotated, List | |
import configparser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mail] | |
sender-email = haxmail <[email protected]> | |
subject = Default subject | |
to = [email protected] | |
smtp-username = [email protected] | |
smtp-password = <mailbot smtp password> | |
smtp-server = smtp.example.com | |
smtp-port = 587 |
This is a bash completion function for program example
that can be set for any alias:
_example_alias_argcomplete() {
alias_value="ansible -i"
alias_name="ans"
offset=$(( ${#alias_value}-${#alias_name} ))
COMP_LINE="${COMP_LINE/$alias_name /$alias_value }"
(( COMP_POINT+=${offset} ))
local IFS=$'\013'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""A no install latency monitoring tool.""" | |
import argparse | |
import enum | |
import json | |
import logging | |
import math | |
import os | |
import platform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import random | |
import re | |
import string | |
def random_str(length, lower=False, upper=False, digits=False, special=False, | |
whitespace=False, hexidecimal=False, octal=False, exclude=None): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'optparse' | |
def parse_args() | |
options = {method: :move, new_tags: [], remove_tags: []} | |
OptionParser.new do |opts| | |
opts.banner = 'usage: tagit -f FILE,FILE,... [-t TAG,TAG,...] [-r TAG,TAG,...] [-c|-l|-m]' | |
opts.on('-l', '--link') do | |
options[:method] = :link | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# For reference https://github.com/netdata/netdata/blob/ceb0e6a490e7dbadc6430eb76705c401eff97864/health/notifications/alarm-notify.sh.in#L921 | |
import argparse | |
import select | |
import smtplib | |
import ssl | |
import sys | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""A script to adjust the fan speed on a Supermicro X9 motherboard based on | |
hard drive temperatures. | |
Install to `/usr/local/sbin/coolhddx9` for use with the associated systemd | |
service and timer. | |
""" | |
import glob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set unrealpak="C:\path\to\UE_4.25\Engine\Binaries\Win64\UnrealPak.exe" |