Skip to content

Instantly share code, notes, and snippets.

@darwin
darwin / readme.md
Created November 16, 2020 21:59
APFS Container cloning/replicating under macOS 11.0 (Big Sur) - with a bootable system

It is the year 2020 and replicating APFS containers still sucks. One would expect it would be a simple copy and paste in the Disk Utility app but this is still far from reality.

Last year I wrote how I managed to clone my macOS system under Catalina. The main trick was to create a DMG file with multiple volumes, mount it on target machine and drop to command-line to do asr restore from synthetised disk while avoiding possible pitfalls.

The good news is that Apple devs definitely worked on improving this under Big Sur and added some documentation (see man asr). But I didn't understand it fully on first read. Maybe someone could explain how is this supposed to work?

@mgbckr
mgbckr / switch_bluetooth_profile.sh
Last active June 11, 2025 17:55
Method to make audio quality better for bluetooth headsets on linux (Fedora 34) using mSBC
#!/bin/bash
# source: https://bbs.archlinux.org/viewtopic.php?pid=1973004
# prepare via enabling mSBC codec for HSP/HFP:
# https://wiki.archlinux.org/title/PipeWire#Low_audio_quality_on_Bluetooth
# the `bluez-monitor.conf` is located at:
# `/usr/share/pipewire/media-session.d/bluez-monitor.conf`
# note that the settings gui needs to be restarted after editing the file and calling
# `systemctl --user restart pipewire.service`
#msbc=`pactl list | grep Active | grep msbc`
@Matt54
Matt54 / MorphModelToSphereView.swift
Last active June 22, 2025 12:38
RealityKit Morph To Sphere with LowLevelMesh and LowLevelTexture
import SwiftUI
import RealityKit
import Metal
struct MorphModelToSphereView: View {
@State var entity: ModelEntity?
@State var lowLevelMesh: LowLevelMesh?
@State var originalVertices: [VertexData] = []
@State var originalTexture: LowLevelTexture?
@State var processedTexture: LowLevelTexture?