Skip to content

Instantly share code, notes, and snippets.

View PaulMcClernan's full-sized avatar
🎯
Focusing on OpenXTalk

Paul McClernan PaulMcClernan

🎯
Focusing on OpenXTalk
View GitHub Profile
@bgulanowski
bgulanowski / notification-with-block.m
Created November 21, 2013 21:42
How to use `-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]`. Drop this in any Objective-C file of your choosing.
#import <libkern/OSAtomic.h>
static int32_t globalCounter;
@interface Test : NSObject
@property uint counter;
@property id observer;
@end
@marteinn
marteinn / progamatically-popover-example.m
Last active January 15, 2022 12:13
NSPopover Example: Create and show a NSPopover programmatically when a user clicks a button in a subview
-(void) buttonClick:(NSButton *)sender {
// Create view controller
EXPopoverViewController *viewController = [[EXPopoverViewController alloc] init];
// Create popover
NSPopover *entryPopover = [[NSPopover alloc] init];
[entryPopover setContentSize:NSMakeSize(200.0, 200.0)];
[entryPopover setBehavior:NSPopoverBehaviorTransient];
[entryPopover setAnimates:YES];
[entryPopover setContentViewController:viewController];
@openfirmware
openfirmware / instructions.md
Created November 7, 2018 06:07
QEMU with Mac OS 9 guest *and working audio*

QEMU Mac OS 9 Instructions

Here is a short guide on how to build QEMU to run Mac OS 9 with working audio. These instructions work for MacOS High Sierra as the host OS, although with some tweaking they may run under Linux/Windows. You should be comfortable compiling software from source before attempting.

Clone QEMU fork

Adapted from instructions from Cat_7

You may need to install XCode and/or the XCode command line tools. If you do not have them, then this process may prompt you to install them (MacOS will do that).

@KaQuMiQ
KaQuMiQ / convertFrameworks.sh
Created January 19, 2021 12:02
Convert fat binary framework into XCFramework
#! /bin/bash
mkdir ./arm64
mkdir ./x86_64
find "./" -name '*.framework' -type d | while read -r FRAMEWORK
do
echo "Preparing framework: $FRAMEWORK"
FRAMEWORK_EXECUTABLE_NAME=$(/usr/libexec/PlistBuddy -c "Print CFBundleExecutable" "$FRAMEWORK/Info.plist")