Skip to content

Instantly share code, notes, and snippets.

View mzeijen's full-sized avatar

Maurice Zeijen mzeijen

View GitHub Profile
@mzeijen
mzeijen / zwa018_0_0.xml
Last active December 23, 2022 23:33
ZWA019 Aeotec Water Sensor 7 Basic OpenHab Z-Wave device information
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="zwave"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
  xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0
                      https://openhab.org/schemas/thing-description/v1.0.0">
  <thing-type id="aeotec_zwa018_00_000" listed="false">
    <label>ZWA018 Aeotec Water Sensor 7 Basic</label>
    <description>
@mzeijen
mzeijen / enable_sudo_touch_id.sh
Created November 9, 2022 10:52 — forked from breun/enable_sudo_touch_id.sh
Enable Touch ID for use with sudo on macOS
# Enable Touch ID for use with sudo on macOS.
PAM_CONFIG_FILE="/etc/pam.d/sudo"
TOUCH_ID_MODULE="pam_tid.so"
if ! grep -q ${TOUCH_ID_MODULE} ${PAM_CONFIG_FILE}; then
echo "Touch ID module for sudo (${TOUCH_ID_MODULE}) not found in PAM configuration file (${PAM_CONFIG_FILE})"
echo "Enter password to enable Touch ID for sudo"
NOW=`date +%FT%T%z`
BACKUP_EXTENSION=".enable_touch_id_backup_${NOW}"
@mzeijen
mzeijen / docker_repull
Created October 21, 2022 11:22 — forked from breun/docker_repull.sh
Repulls all your Docker images, updating them to the latest state
# Get output from 'docker images', skip the header line, print '{image_name}:{image_tag}' and feed each image as an argument to 'docker pull'
docker images | tail -n +2 | awk '{ print $1":"$2 }' | xargs -L 1 docker pull
@mzeijen
mzeijen / docker_remove_untagged
Created October 21, 2022 11:21 — forked from breun/docker_remove_untagged
Remove all untagged Docker images
DIGESTS=`docker images | awk '$2 == "<none>" { print $3 }'`
if [ -n "${DIGESTS}" ]; then
docker rmi --force $DIGESTS
fi