Skip to content

Instantly share code, notes, and snippets.

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'/>
@mailinglists35
mailinglists35 / choosing ext4 vs xfs
Last active May 27, 2023 22:21
when to choose EXT4 over XFS - ext4 is still king for home use or older systems
https://access.redhat.com/articles/3129891#choosing-a-local-file-system-6
Another way to characterize this is that the Ext4 file system variants tend to perform better on systems that have limited I/O capability. Ext3 and Ext4 perform better on limited bandwidth (< 200MB/s) and up to ~1,000 IOPS capability. For anything with higher capability, XFS tends to be faster. XFS also consumes about twice the CPU-per-metadata operation compared to Ext3 and Ext4, so if you have a CPU-bound workload with little concurrency, then the Ext3 or Ext4 variants will be faster. In general, Ext3 or Ext4 is better if an application uses a single read/write thread and small files, while XFS shines when an application uses multiple read/write threads and bigger files.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_file_systems/overview-of-available-file-systems_managing-file-systems
ext4 is better when:
Single-threaded I/O
Limited I/O capability (under 1000 IOPS)
@mailinglists35
mailinglists35 / gptbios
Created May 27, 2023 22:17
create parted gpt partitions on bios disk including microsoft reserved
mktable gpt
mkpart ESP fat32 1MiB 513MiB
set 1 boot on
mkpart biosboot 513MiB 514MiB
set 2 bios_grub on
mkpart msftres 514MiB 530MiB
unit MiB
(parted) p
Model: ATA Samsung SSD 860 (scsi)