Skip to content

Instantly share code, notes, and snippets.

@apconole
apconole / mail_notify.py
Created September 19, 2015 11:36
Simple python mail notification utility
#!/usr/bin/env python
# Copyright (C) 2015 Aaron Conole <aconole@bytheb.org>
# I cobbled this together looking for a really lightweight mail
# notification utility to couple with emacs. I never found
# a solution - this fits the bill for my needs
#
# LICENSE: GPLv2 with the caveat that it cannot be upgraded
# to GPLv3
(defun save-gnus-buffer-temp-article-saver (&optional filename overwrite)
"Save"
(setq filename "/tmp/somepatch.patch")
(with-current-buffer gnus-save-article-buffer
(save-excursion
(save-restriction
(widen)
(when (file-exists-p filename)
(delete-file filename))
(gnus-output-to-file filename))))
;; Licensed under the terms of the GNU General Public Agreement
;; Version 2.0 or later
;; This work is derived from the gnus-article-html function in
;; gnus-html.el originally authored by Lars Magne Ingebrigtsen <larsi@gnus.org>
(require 'xwidget)
(defun xw-gnus-article-html (&optional handle)
(let ((article-buffer (current-buffer)))
(unless handle
@apconole
apconole / screen-record.sh
Created January 13, 2017 21:50
Record a screen (either full screen or grabbing a screen)
#!/bin/bash
# Copyright (C) 2016, 2017 Red Hat, Inc.
# Screen capture script (with fiddly goodies)
#
# Licensed under the GNU GPL, v2 or greater
#
# To record with sound, you must install an ffmpeg which is properly compiled
# with libalsa support. This may require using RPMFusion repositories, and
# installing the libass libavcodec supported ffmpeg.
#! /bin/sh
## Check current git branch against original release abi
# Copyright (C) 2017, Red Hat, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@apconole
apconole / cirrus_mon
Created December 6, 2023 21:37
cirrus monitor script
#!/bin/bash
# SPDX-Identifier: gpl-2.0-or-later
# Copyright (C) 2023, Red Hat, Inc.
#
# Monitors cirrus build history for builds in a series.
# Records the builds in the series database (and emits them on the
# stdout line for processing)
#
# Licensed under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License, or
/* Copyright (C) 2024 - Red Hat, Inc.
* Author: Aaron Conole <aconole@redhat.com>
* Licensed under GPLv2
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <errno.h>
#!/bin/bash
BASE_COLLECTION_PATH="must-gather"
OVS_DUMP_PATH=${OUT:-"${BASE_COLLECTION_PATH}/openvswitch"}
mkdir -p "${NETWORK_LOG_PATH}"/
GLOBAL_OVS_FILE_COPY=(
"/run/openvswitch/ovsdb-server.pid"
"/run/openvswitch/ovs-vswitchd.pid"
"/run/openvswitch/ovs-monitor-ipsec.pid"