Skip to content

Instantly share code, notes, and snippets.

@karawitan
karawitan / audio-hijack-close-missing-audio-device-popup.md
Last active June 18, 2025 14:47
macosx audio hijack script to acknoledge "missing audio device" popup

Macosx: Audio Hijack script to acknowledge "missing audio device" popup

To programmatically acknowledge or handle a "missing audio device" popup in macOS when using Audio Hijack, you can use AppleScript or a shell script to automate certain responses, though there are limitations depending on the nature and context of the popup.

osascript -e 'tell application "System Events"' -e 'tell process "Audio Hijack"' -e 'try' -e 'click button 1 of (first window whose subrole is "AXDialog")' -e 'end try' -e 'end tell' -e 'end tell'

You may Save this as a .scpt file and run it with Script Editor or osascript from Terminal.

@karawitan
karawitan / gist:3d89515ea39a9c97c7f558b8a6637ab2
Created February 22, 2024 23:38
stern multipod log viewer
stern -n rook-ceph mgr*
stern -n rook-ceph --max-log-requests 100 .
stern -n rook-ceph rook-ceph-osd-prepare*
stern '.*' --condition ready=false
@karawitan
karawitan / gist:e79cf006dd31e30d2c0602a3d5da37b7
Created February 22, 2024 23:37
using raspberry pi with an onboard dac
mpv --no-video --audio-device=/dev/dsp
pacmd list-sinks | grep -B 1 'name: <tunnel'
pacmd set-default-sink 2
alsa-info output
http://alsa-project.org/db/?f=ec63c66f3a1fb8683407c92d5f9ecf20f251c4d8
@karawitan
karawitan / gist:dc952bef32488dfb3c98fca3717b6376
Created February 22, 2024 23:36
journalctl common commands
journalctl -u <unit>
journalctl -u <unit> -f --no-hostname
# view the system journal logs for the current boot session
journalctl -b
journalctl -u ufw.service -f
journalctl --vacuum-time=2d
journalctl --vacuum-time=600s
@karawitan
karawitan / gist:92591c61e75a55389f5a2326c94b5106
Created February 22, 2024 23:33
kubectl delete finilizers
# when deletion of Kubernetes resource is getting stuck, solve it the bad way
kubectl patch configmap/mymap \
--type json \
--patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
#
kubectl patch ns/longhorn-system -p '{"metadata":{"finalizers":[]}}' --type=merge
ipfs resolve /ipns/ipld.io
ipfs repo ls
ipfs refs local | wc -l
ipfs pin add /ipns/torrent-paradise.ml
ipfs bitswap wantlist
@karawitan
karawitan / gist:1eb3af5cf106e05ddd7d08ee7280690a
Created February 22, 2024 23:26
strace usefull commands
strace --trace=file,network,process -f -o /tmp/log
# disable suspend.target
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
# check suspend daemon status
sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
@karawitan
karawitan / gist:fc0b6f883cbe5f71b81e221392bcf2ff
Last active January 25, 2025 13:32
Common adb shell commands
adb root
adb sideload
adb shell ps
adb shell top
adb shell getprop
adb shell setprop
@karawitan
karawitan / make_ipxe_uefi_usb.md
Created April 27, 2021 07:45 — forked from AdrianKoshka/make_ipxe_uefi_usb.md
Making a UEFI bootable iPXE USB drive

Making a UEFI bootable iPXE USB drive

Build the UEFI executable for iPXE

# First we'll clone iPXE
$ git clone git://git.ipxe.org/ipxe.git
# Go into the src directory of the cloned git repo
$ cd ipxe/src
# Compile the UEFI iPXE executable