Skip to content

Instantly share code, notes, and snippets.

View Swipe650's full-sized avatar
🏠
Retired - now doing interesting IT stuff

SwitchToLinux Swipe650

🏠
Retired - now doing interesting IT stuff
View GitHub Profile
@Swipe650
Swipe650 / mute Google Home kitchen speaker based on weekend or weekday.yaml
Created May 17, 2026 20:48
mute Google Home kitchen speaker for various length depending on time of day and also based on weekend or weekdays
metadata:
name: mute kitchen week/weekend
description: Mutes the kitchen speaker for 121s during the day, 140s on weekday evenings, 120s on weekend evenings, and 120s overnight.
automations:
# --- 1. DAYTIME PROFILE (121 Seconds) ---
# Runs daily between 6:00 AM and 7:00 PM
- starters:
- type: assistant.event.OkGoogle
eventData: query
@Swipe650
Swipe650 / mute_kitchen_based_on_time_of_day.yaml
Created May 17, 2026 13:23
mute and unmute my kitchen Google Home speaker for a set time period based on the time of the day
metadata:
name: mute kitchen
description: Mutes the kitchen speaker for 121s during the day, 140s in the evening, and 120s overnight.
automations:
# --- 1. DAYTIME PROFILE (120 Seconds) ---
# Runs between 6:00 AM and 7:00 PM
- starters:
- type: assistant.event.OkGoogle
eventData: query
@Swipe650
Swipe650 / mute all speakers for 180sec.yaml
Created May 14, 2026 17:04
mute all speakers for 180sec
metadata:
name: mute all speakers for 180sec
description: Mute and unmute all speakers after 3 minutes
automations:
starters:
- type: assistant.event.OkGoogle
eventData: query
is: mute 180
@Swipe650
Swipe650 / mute kitchen home speaker.yaml
Last active May 15, 2026 14:24
Mute Kitchen home speaker for 180secs and then unmute
# Go to home.google.com and create a new automation using the script editor
metadata:
name: mute kitchen # Choose a short name that summarizes important starters and actions
description: Mutes the kitchen speaker for 180 seconds.
automations:
starters:
- type: assistant.event.OkGoogle
eventData: query
is: mute kitchen # <--- This is the voice command to trigger the automation
@Swipe650
Swipe650 / Edit meta data of mp3 file using lame
Last active May 12, 2024 12:22
Edit meta data of mp3 file using lame
lame --ti image.jpeg 'song.mp3'
@Swipe650
Swipe650 / Edit meta data of flac files using ffmpeg
Last active May 12, 2024 12:23
Edit meta data of flac files using ffmpeg
ffmpeg -i "song.flac" -i ./image.jpg -map 0:a -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic "new_song_name.flac"
sudo journalctl --vacuum-time=30d
dd bs=4M if=path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync
#!/bin/bash
# Configure systemd-boot
arch-chroot /mnt bootctl --path=/boot install
arch-chroot /mnt bootctl update
# pacman hook
mkdir -p /mnt/etc/pacman.d/hooks
cat > /mnt/etc/pacman.d/hooks/100-systemd-boot.hook << EOF
[Trigger]