Skip to content

Instantly share code, notes, and snippets.

View jon's full-sized avatar

Jon Olson jon

View GitHub Profile
@jon
jon / BPImageTransformer.h
Created February 3, 2010 22:21
An NSValueTransformer to convert images to/from serialized PNGs (for CoreData)
//
// BPImageTransformer.h
// Skates
//
// Created by Jon Olson on 2/3/10.
// Copyright 2010 Ballistic Pigeon, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@jon
jon / BPUUID.h
Created February 3, 2010 21:09
An Objective-C wrapper for CFUUID
//
// BPUUID.h
// Skates
//
// Created by Jon Olson on 2/3/10.
// Copyright 2010 Ballistic Pigeon, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@jon
jon / BPGeometry.h
Created February 2, 2010 03:22
A collection of 2D vector-geometry functions for dealing with CGPoints in Cocoa/Cocoa Touch
/*
* BPGeometry.h
*
* Created by Jon Olson on 11/30/09.
* Copyright 2009 Ballistic Pigeon, LLC. All rights reserved.
*
*/
#import <Foundation/Foundation.h>
# Builds an iPhoneOS/Simulator compatible version of BoehmGC and packages
# it up into a "static framework" as per Landon Fuller's suggestion at
# http://landonf.bikemonkey.org/code/iphone/iPhone_Framework_Support.20081202.html
fail() {
echo $1 >&2
exit 1
}
clean() {
@jon
jon / boss.c
Created November 10, 2009 22:53
void init_shm() {
shm_global_key = ftok(IPC_KEY_FILE, SHM_GLOBAL_KEY);
shm_thread_key = ftok(IPC_KEY_FILE, SHM_THREAD_KEY);
if ((shm_global_d = shmget(shm_global_key, sizeof(shm_global_t),
IPC_CREAT | 0660)) < 0) {
perror("shmget-global");
return 5;
}
//
// UIWebView+SmartJS.h
//
// Created by Jon Olson on 12/27/08.
// Copyright 2008-2009 Ballistic Pigeon, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSString * const SmartJSErrorDomain;