Skip to content

Instantly share code, notes, and snippets.

@e7d
e7d / switch-sink.sh
Last active August 30, 2021 10:14
Switch output device using PulseAudio sound server Control (pactl)
#!/bin/bash
if [ ! -x "$(command -v pactl)" ]; then
cat <<EOL >&2
$(basename $0): missing pactl
The PulseAudio "pactl" binary is required to use this program.
EOL
exit 1
fi
@e7d
e7d / openfortigui.sh
Last active October 12, 2021 13:38 — forked from yoyosan/openfortigui.md
Build openfortigui in Fedora 34+
#!/bin/sh
# install required packages:
sudo dnf install qt5-qtbase-devel openssl-devel qtkeychain-qt5-devel -y
# create a symlink to /usr/bin/qmake, if needed
sudo ln -s /usr/lib64/qt5/bin/qmake /usr/bin/qmake
# build openfortigui code
git clone https://github.com/theinvisible/openfortigui.git /tmp/openfortigui
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active March 5, 2026 19:08
Remove obsolete GPG key from DNF (Fedora)
@e7d
e7d / find-container-by-pid.sh
Created June 26, 2023 13:43
Find a PID running container name
#!/bin/bash
set -e
error() {
echo "Error: $1"
exit 1
}
trap 'error "An unexpected error occurred. Exiting."' ERR
@e7d
e7d / ubuntu-24.04-asdf-php-deps.sh
Last active November 11, 2024 09:56
PHP dependencies for ASDF install on Ubuntu 24.04
#!/bin/bash
sudo apt install autoconf \
bison \
libcurl4-openssl-dev \
libgd-dev \
libonig-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
@e7d
e7d / KEPZB-110-for-Alarmo.yaml
Last active June 6, 2026 22:05
Keypad Frient (KEPZB-110) for Alarmo
blueprint:
name: Keypad Frient (KEPZB-110) for Alarmo
description: >
Manage multiple PIN codes to arm and disarm an alarm using the Frient Keypad,
synchronizing the state with an Alarmo central or other alarm panel.<br>
You will need to create the same PIN codes in Alarmo, which also supports RFID badges.
domain: automation
input:
keypad:
name: Frient Keypad