Skip to content

Instantly share code, notes, and snippets.

@groundwater
groundwater / NOTES.md
Created May 12, 2026 01:08
macOS AF_VSOCK silent write loss with non-blocking I/O (Virtualization.framework)

Investigation notes — macOS AF_VSOCK silent data loss

Status: kernel bug confirmed at the raw AF_VSOCK layer (no NIO, no third-party deps). Ready to file with Apple. Workarounds exist on the consumer side. This file is the full handoff to anyone picking this up.


1. TL;DR

using System;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
static class Program
{
[STAThread]
static void Main()
{
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Current TS File",
"type": "node",
"request": "launch",
@groundwater
groundwater / bibtex.png
Created December 27, 2017 18:14 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
$ brew install pdfsandwich
$ pdfsandwich FILE
struct kevent {
uintptr_t ident; /* identifier for this event */
int16_t filter; /* filter for event */
uint16_t flags; /* general flags */
uint32_t fflags; /* filter-specific flags */
intptr_t data; /* filter-specific data */
void *udata; /* opaque user data identifier */
} kevent;
::kevent:entry
@groundwater
groundwater / dependency-injection.cpp
Created July 26, 2016 06:45
c++ dependency injection via templates
#import <iostream>
// A simple container class for holding results
class Item {
using str = std::string;
private:
str _item;
public:
Item(str k): _item {k} {}
const str value() const {
#import <stdio.h>
template<int i>
class Integer {
public:
static const int value = i;
};
template<class Left, class Right>
class Add {