Use a Vector as a Writer in Rust

To write to a vector, using the std::io::Write-trait, you need to pass a & mut – a mutable reference – of the vector where you need the writer. If you just pass the vector, it gets moved into the function. A reference doesn't implement the std::io::Write-trait. In code: use plist::Value; // I am using the plist crate as an example let mut buf = Vec::new(); // creating the backing vector let dic = Value::Dictionary(body); // just to get the correct type dic.
Read more →

FreeBSD 12.2-Release slow IPv6 inside jail

FreeBSD 12.2-Release seems to not handle the case, if it receives packets using tcp large receive offloading (lro) and needs to forward such packets on another interface, with a smaller MTU. This is exactly what happens on the return path from the internet to your jail for tcp connections. To mitigate this, turn off lro on the host’s external network interface.
Read more →

VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb) indicates broken boot entry in (Gigabyte) UEFI

I wanted to move my nixOS installation to a bigger SSD. After copying over the data, and creating a UEFI boot entry, it didn't show up in the boot menu. After rebooting I found the entry changed to: VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb) This seems to be the indication for a broken entry. In my case, the contents of the EFI partition weren't right, but this also comes up, after I disconnected the original drive.
Read more →

Access iLO4's RemoteConsole of HP Proliant Microserver Gen8 from macOS

To access the remote console of a HP Proliant Microserver Gen8 from macOS Safari, you need to reload the page “with plugins”, by long-pressing the reload icon in the url bar and clicking on the “reload with plugins” option. To use the remote virtual drive feature, you need to give the java applet special permissions to access the disk, the first post in this stackoverflow post shows how to do that.
Read more →

Repair broken contact syncing on macOS Sierra

Yesterday i fixed a problem with the contacts app on my mac. It said, “some Contacts couldn't be synced” and didn't sync some of my contacts, most of them where still synced. To invesitgate, I looked in the Console.app and filtered for Contacts. It said: 2017-06-20 23:11:35.008086+0200 0x17f462 Fault 0x80000000000545f6 26290 Contacts: (CardDAVPlugin) [com.apple.contacts.carddav.plugin] -_handleAddsOrModifies: could not parse vCard in <private> and 2017-06-20 23:16:07.355156+0200 0x182af7 Fault 0x8000000000054af8 28288 Contacts: (CardDAVPlugin) [com.
Read more →

Disable log censoring in macOS Sierra (<private>)

Change default textediting keybindings on macOS

On macOS, there are default keybindings for interacting with text like <Ctrl> + t to swap the places of the characters sourroundig the cursor like this: from “foo ba” to “foo ab”. Another default is that you can move the coursor word-wise, by using the <Option> + <Left or Right arrow key shortcut. For me it feels more natural to use the <Ctrl> key as modifier for this. To change this default, you have to create a ~/Library/KeyBindings/DefaultKeyBinding.
Read more →