This file contains 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
#!/bin/bash | |
DLOAD_DIR=/opt | |
gitea_help () { | |
echo -e "Usage: gitea-upgrade <version>\n\nSee https://codeberg.org/forgejo/forgejo/releases for current versions.\n"; | |
echo $1; | |
} | |
case $(uname -m) in |
This file contains 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
FROM ansible/awx-ee:latest | |
USER root | |
RUN dnf config-manager --set-enabled epel && \ | |
dnf install epel-release epel-next-release -y && \ | |
dnf install --refresh cowsay -y | |
USER 1000 |
This file contains 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
#!/bin/bash | |
dbus-monitor --system "type='signal',path='/org/freedesktop/UPower/devices/battery_BAT0',member='PropertiesChanged'" | while read LINE; do | |
echo ${LINE} | grep battery_BAT0 | grep -q PropertiesChanged | |
if [ $? -eq 0 ]; then | |
BATT_STAT=$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:State | awk '{ print $3; }') | |
if [ $BATT_STAT -eq 1 ] || [ $BATT_STAT -eq 4 ]; then | |
LEVEL=$(powerprofilesctl list | grep -q performance && echo "performance" || echo "balanced") | |
elif [ $BATT_STAT -eq 5 ]; then | |
LEVEL="balanced" |
This file contains 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
#!env/bin/python | |
import gi, subprocess, sys, time | |
gi.require_version('Notify', '0.7') | |
from gi.repository import GLib,Notify | |
class App(): | |
def __init__(self): | |
self.containers = [] |
This file contains 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
#!env/bin/python | |
import gi, subprocess, sys | |
gi.require_version('Notify', '0.7') | |
from gi.repository import Notify | |
containers = [] | |
keys=['created','name','image'] | |
pman_out = subprocess.run(["podman","ps","--format",'{{.Created}}|{{.Names}}|{{.Image}}'],capture_output=True) | |
if pman_out.returncode == 0: |
This file contains 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
# Use at your own risk! You should try `dnf remove --duplicates` first. Use this as a last resort. | |
sudo rpm -e --nodeps $(sudo dnf check 2>/dev/null | grep duplicate | cut -f1 -d' ') |
This file contains 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
/^(?<time>\w{3}\s+\d \d{1,2}:\d{1,2}:\d{1,2}) (?<host>[\w\-\d]+) (?<process>\w+)\[(?<pid>\d+)\]\: ((conn=(?<conn>\d+) (fd=(?<fd>\d+))?(op=(?<op>\d+))?)?\s?(?<message>.*))$/ |