Skip to content

Instantly share code, notes, and snippets.

View jevinskie's full-sized avatar

Jevin Sweval jevinskie

View GitHub Profile
@jevinskie
jevinskie / clickScreenshotWindowMarkupButton.m
Created December 7, 2025 01:34 — forked from hym3242/clickScreenshotWindowMarkupButton.m
A objc program that clicks the "markup" button in "com.apple.screencaptureui" application 's "ScreenshotAnnotationWindow" (titled "Screenshot")
// compile with: cc clickScreenshotWindowMarkupButton.m -o clickScreenshotWindowMarkupButton -framework Cocoa
// This program clicks the "markup" button in "com.apple.screencaptureui" application 's "ScreenshotAnnotationWindow" (titled "Screenshot")
// Mostly written by the obviously-dumber-than-first-launched ChatGPT 4 Classic. No rights reserved.
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
// Function to find the PID using bundle identifier
pid_t pidForBundleIdentifier(NSString *bundleIdentifier) {
NSArray *apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:bundleIdentifier];
#include <fcntl.h>
#include <iostream>
#include <string>
#include <unistd.h>
#include <sys/wait.h>
#include <cstring>
#include "z3_pipe.h"
#define ensure(b) ensure_helper(b, __FILE__, __FUNCTION__, __LINE__)
@jevinskie
jevinskie / proxy.c
Created January 18, 2017 23:56 — forked from matteyeux/proxy.c
/*
Dead simple com.apple.companion_proxy client.
This allows you to forward ports bound to your Watch's 127.0.0.1 to a random port on your iPhone.
-- qwertyoruiop, 2016
*/
#include <stdio.h>