Skip to content

Instantly share code, notes, and snippets.

View mdippery's full-sized avatar
💭
Have you seen an older me go by in a time machine?

Michael Dippery mdippery

💭
Have you seen an older me go by in a time machine?
View GitHub Profile
@mdippery
mdippery / window.m
Last active March 14, 2025 23:34
Get window information using Core Graphics
#import <stdio.h>
#import <sys/sysctl.h>
#import <unistd.h>
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
/* Returns the parent of any arbitrary process, more flexible than
* getpid() and getppid().
*/