Skip to content

Instantly share code, notes, and snippets.

View knedlsepp's full-sized avatar
🍍
🖋️

Josef Kemetmüller knedlsepp

🍍
🖋️
View GitHub Profile
@nickjacob
nickjacob / systemd-prblm.service
Last active March 17, 2023 16:11
execute arbitrary bash code/variable substitution in systemd units
[Unit]
Description=Demonstrate Bash
[Service]
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/echo "2 + 2 = ${MYVAR}"
@Sahil
Sahil / fix_airplay.sh
Created June 2, 2013 00:13
Kill coreaudiod process to fix issue with 10.8 where AirPlay refuses to be selected as the desired audio output source. this is far better than restart your router or computer (which so far have seemed to be the only other options). This works with my MBP 13" Retina + ATV3
#!/bin/bash
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`