Skip to content

Instantly share code, notes, and snippets.

@mailinglists35
mailinglists35 / net_rate_google_gemini.sh
Created July 9, 2025 13:19
linux any interface traffic rate viewer using only bare tools
#!/bin/bash
# Funcție pentru a afișa utilizarea și a ieși
show_help() {
echo "Utilizare: $0 [-i <interfață>] [-t <secunde>]"
echo " -i <interfață> : Specifică interfața de rețea de monitorizat (ex: eth0, enp0s3)."
echo " Dacă nu este specificată, se va detecta interfața implicită."
echo " -t <secunde> : Intervalul de timp în secunde pentru calculul mediei și refresh (implicit: 1)."
echo " Va afișa media ultimelor <secunde> și se va actualiza la fiecare <secunde>."
echo ""
@mailinglists35
mailinglists35 / scratch notes todo to try
Created November 18, 2024 16:06
moving relocating OneDrive com.apple.FileProvider away to external Volume storage
these are scratch notes, not a working solution.
but please report success if you understand the core idea and it works for you.
the idea I'm thinking is to apfs mount two volumes, we need apfs xattrs, that's why symlinks don't work.
% cd Library/CloudStorage
one volume should be mounted at CloudStorage because it has no xattrs.
not cloud provider name, as it needs xattrs which are apfs specific.
so you have all clouds in one place, cannot have selectivity. except iCloud which goes into it's own separate world.
% xattr OneDrive-Personal
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,[email protected]
Unable to negotiate with 192.168.1.1 port 22: no matching host key type found. Their offer: ssh-rsa
ssh -o KexAlgorithms=diffie-hellman-group1-sha1 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa user@host
@mailinglists35
mailinglists35 / fuckyoutijme
Created August 22, 2024 12:39
Tijme Gommers is an asshole
https://archive.ph/cBcTD
https://web.archive.org/web/20240531085449/https://github.com/raivo-otp/ios-application/issues/328
https://web.archive.org/web/20240209114245/https://github.com/raivo-otp/marketing-website/issues/19
https://archive.ph/fGnO3#selection-8895.0-8895.99
@mailinglists35
mailinglists35 / macos time machine excluded
Created May 9, 2024 22:17
macos time machine excluded
https://bombich.com/kb/ccc6/some-files-and-folders-are-automatically-excluded-from-backup-task
Skip to main content
Home
FEATURES
DOWNLOAD
BLOG
HELP
Knowledge Base (ccc6)Some files and folders are automatically excluded from a backup task
https://matt.sh/apfs-object-map-free-recovery
APFS Object Map Recovery (free)
APFS Object Map Recovery
I spent a day figuring out how to look into a corrupt encrypted APFS partition. Here’s the notes.
If you only care about the answer, jump to the last section.
Kernel Panic
macOS hard panicked on me with a graphics driver corruption error com.apple.iokit.IOAcceleratorFamily2 (which happened after seven “gpuRestart” logs were generated back-to-back).
@mailinglists35
mailinglists35 / macanon.sh
Created March 21, 2024 21:22
anonymize ethernet mac address
#!/bin/bash
# thanks microsoft copilot. worked from first try. prompt:
# can you write a small script in a language of your choice that takes input as defined by the name of the input file, searches for patterns that resemble an ethernet mac address including those that omit the zero, such as like when netstat on macos does, then replace the last three octets of the mac address with xx:xx:xx
# it wrote python but python requires xcode so I asked for a rewrite in bash
filename="$1"
# MAC address pattern (with optional leading zeros)
pattern="([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]{1,2})"
@mailinglists35
mailinglists35 / add_cow.sh
Last active July 12, 2023 16:33
Create writable device files from readonly images on Linux using device mapper
copied from https://git.scc.kit.edu/-/snippets/563, found on search for "device mapper volatile writeable readonly"
#!/bin/bash
set -e
# test if $1 exists
test -f "$1"
BASEDIR=$(dirname "$1")
@mailinglists35
mailinglists35 / dkms rebuild reinstall
Created June 21, 2023 15:13
dkms rebuild reinstall
27332 pts/0 S+ 0:00 | \_ sudo -E dnf --enablerepo=ol8_UEKR6 install kernel-uek-5.4.17-2136.320.7.1.el8uek.x86_64 kernel-uek-devel-5.4.17-2136.320.7.1.el8uek.x86_64
27334 pts/0 S+ 1:40 | \_ /usr/libexec/platform-python /bin/dnf --enablerepo=ol8_UEKR6 install kernel-uek-5.4.17-2136.320.7.1.el8uek.x86_64 kernel-uek-devel-5.4.17-2136.320.7.1.el8uek.x86_64
48159 pts/0 S+ 0:00 | \_ /bin/sh /var/tmp/rpm-tmp.UD5iFV 2
56855 pts/0 S+ 0:00 | \_ /bin/bash /bin/kernel-install add 5.4.17-2136.320.7.1.el8uek.x86_64 /lib/modules/5.4.17-2136.320.7.1.el8uek.x86_64/vmlinuz
56897 pts/0 S+ 0:00 | \_ /bin/sh /usr/lib/kernel/install.d/40-dkms.install add 5.4.17-2136.320.7.1.el8uek.x86_64 /boot/b26894ddea4a49caaac4c71d4e27f057/5.4.17-2136.320.7.1.el8uek.x86_64 /lib/modules/5.4.17-2136.320.7.1.el8uek.x86_64/vmlinuz
56898 pts/0 S+ 0:00 | \_ /bin/sh /usr/lib/
@mailinglists35
mailinglists35 / macos
Created June 18, 2023 19:50
trying to run macos under unsupported rhel9.2 via podman libvirt/qemu inside container
sudoedit /etc/tmpfiles.d/libvirt-container.conf
d /run/libvirt-fedora 0755 ml35 ml35 -
sudo systemd-tmpfiles --create /etc/tmpfiles.d/libvirt-container.conf
sudo gpasswd -a ml35 kvm
sudo setsebool -P container_use_devices=true
sudo setsebool -P container_manage_cgroup true
$ grep source /var/local/macos-mojave-10.14.xml
<resource>
</resource>
<source dev='/dev/zvol/gen8/vm/mojave-din-vmware'/>