Skip to content

Instantly share code, notes, and snippets.

//
// main.c
//
#include <stdio.h>
#include "Game.h"
int main(int argc, const char * argv[])
{
Game * game = NewGame();
@interface NSMenu (SeparatorAdditions)
- (void)removeExtraSeparatorItems;
@end
@implementation NSMenu (SeparatorAdditions)
- (void)removeExtraSeparatorItems;
{
// Remove separator at index 0
while (self.itemArray.count > 0) {
#import <Foundation/Foundation.h>
void eachrow(size_t total, size_t nrows, size_t ncols, char const*** rows, BOOL(^cb)(size_t i, size_t ncols, char const **row, size_t *lengths))
{
size_t lengths[ncols];
for (size_t k = 0; k < total; ++k)
{
size_t i = k % nrows;
for (size_t j = 0; j < ncols; ++j)
{
@implementation AppDelegate
{
AGApplicationMoved * _moved;
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
_moved = [[AGApplicationMoved watchForApplicationMoving:^{
//
// APTokenSearchField.h
// TokenFieldTest
//
// Created by Seth Willits on 12/4/13.
// Copyright (c) 2013 Araelium Group. All rights reserved.
//
#import <Cocoa/Cocoa.h>
graph "Seth's Graph" {
graph [dpi=72,
overlap=orthoxy,
sep=0.27777,
splines=false
];
node [fixedsize=1,
height=0.5,
label="\N",
shape=box,
void *Sys_LoadDll( const char *name, char *fqpath,
int( **entryPoint ) ( int, ... ),
int ( *systemcalls )( int, ... ) ) {
void *libHandle;
void ( *dllEntry )( int ( *syscallptr )( int, ... ) );
char fname[MAX_OSPATH];
char *pwdpath;
char *homepath;
char *basepath;
char *gamedir;
//
// AppDelegate.m
// MouseTest
//
// Created by Seth Willits on 1/30/14.
// Copyright (c) 2014 Araelium Group. All rights reserved.
//
#import "AppDelegate.h"
@swillits
swillits / Unquarantine.sh
Last active February 12, 2024 23:32
(Gatekeeper) Unquarantine files. http://www.sethwillits.com/temp/Unquarantine.workflow.zip Automator service. Stick in ~/Library/Services. Right-click file(s) in Finder, Services -> Unquarantine. Bingo!
function unquarantine()
{
for file in $@
do
xattr -d com.apple.quarantine $file
if [ -d "${file}" ] ; then
while IFS= read -r -d '' subfile; do
if [ "$file" != "$subfile" ]; then
unquarantine $subfile;
//
// Crashed Thread: 0 Dispatch queue: com.apple.main-thread
//
// Exception Type: EXC_BAD_ACCESS (SIGSEGV)
// Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
//
// VM Regions Near 0:
// -->
// __TEXT 000000010d268000-000000010d26a000 [ 8K] r-x/rwx SM=COW /Users/USER/Library/Developer/Xcode/DerivedData/CrashSymbolTest-duwezzdulbkaqtffihfubuglwpki/Build/Products/Debug/CrashSymbolTest
//