Skip to content

Instantly share code, notes, and snippets.

@adamamyl
adamamyl / macos26-breaks-custom-dns.md
Last active April 30, 2026 16:19
Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Ah, the joys of waking up to find the Mac's done an overnight upgrade… and erm, suddenly things stop working. Thankfully, me and Claude managed to work out what the fuck is going on… I'm sharing here, as well as having raised in on https://feedbackassistant.apple.com/feedback/22280434 (that seems to need a login?).

Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Product: macOS 26.3.1 (Darwin 25.3.0, Build 25D771280a) Component: Networking → DNS / mDNSResponder Regression from: macOS 25.x 26.3.0 (working immediately prior to overnight update)


@nitred
nitred / optimal_mtu.md
Last active April 21, 2026 20:14
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@demurky
demurky / mpvmusic.sh
Last active January 3, 2022 17:50
Play music in terminal via mpv.
#!/bin/sh
clear -x; tput civis # hide cursor
mpv \
--audio-display=no --term-osd-bar --force-window=no \
--keep-open=yes --display-tags-clr --term-title='mpv' \
--msg-level=cplayer=error,ffmpeg=fatal,ffmpeg/demuxer=error \
--term-status-msg='File: ${filename}\n\nTitle: ${metadata/by-key/title}\nArtist: ${metadata/by-key/artist}\nAlbum: ${metadata/by-key/album}\n\n${!playlist-count==1:Playing ${playlist-pos-1}/${playlist-count}\n}${?pause==yes:(Paused) }${time-pos} / ${duration}' \
--term-osd-bar-chars='[-> ]' "$@"
tput cnorm # cursor back to normal
@tinywrkb
tinywrkb / btswitch
Last active May 14, 2025 08:35
NOT NEEDED WITH 0.3.21 OR GIT VERSION | PipeWire Pulse Server Bluetooth Auto-Switch
#!/bin/bash
#
# ~/.local/bin/btswitch
#
# wait a second this is too fast for udev
sleep 1
btdev="$(pactl list sinks|grep Name|grep 'bluez.*.a2dp.sink'|sed 's/Name: //'|sed 's/\s//')"
if [ -n "$btdev" ]; then
@mrprofessor
mrprofessor / gifsicle_delete_frames.sh
Last active October 6, 2025 18:49
Delete frames using gifsicle
#gifsicle -O3 -k 8 --lossy=80 -o tty-small.gif js_demo.gif
#gifsicle --lossy=80 -o tty-small.gif js_demo.gif
#gifsicle --delete "#0-12" -o tty-small1.gif tty-small.gif
#gifsicle tty-small.gif --delete "#0-12" -o tty-small.gif
# Make a copy of the file
cp $1 $2
gifsicle "$1" --delete "#1-10" -o "$2"
gifsicle "$2" --delete "#100-105" -o "$2"
echo "script completed"