Skip to content

Instantly share code, notes, and snippets.

View zwaldowski's full-sized avatar

Zachary Waldowski zwaldowski

View GitHub Profile
@zwaldowski
zwaldowski / MASWindow.h
Created January 28, 2011 21:15
A Mac App Store-like NSWindow subclass.
//
// MASWindow.h
// A Mac App Store-like NSWindow subclass.
//
// Created by Zachary Waldowski on 1/8/11.
// Secured under the "do-whatever-the-hell-you-want-with-it" license. Erm, copyright 2011.
//
#import <Cocoa/Cocoa.h>
@zwaldowski
zwaldowski / NSObject+Blocks.h
Created May 4, 2011 12:08
Perform blocks with delays and cancellation
//
// NSObject+Blocks.h
// Filemator
//
// Created by Zachary Waldowski on 4/12/11.
// Copyright 2011 Dizzy Technology. All rights reserved.
//
@interface NSObject (Blocks)
@zwaldowski
zwaldowski / NSEnumerateRange.m
Created September 14, 2011 18:46
Block-based enumeration for NSRange
//
// NSEnumerateRange.m
//
// Created by Zachary Waldowski on 9/14/11.
// Copyright 2011 Dizzy Technology. Licensed under MIT.
//
NS_INLINE void NSEnumerateRange(NSRange range, void (^block)(NSUInteger idx, BOOL *stop)) {
block = Block_copy(block);
NSUInteger start = range.location;
@zwaldowski
zwaldowski / SMXMLDocument.h
Created October 30, 2011 03:51
Modern, simplified SMXMLDocument
/*
The MIT License
Copyright (c) 2011 Spotlight Mobile
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@zwaldowski
zwaldowski / MRSimpleXMLRequestOperation.h
Created October 30, 2011 03:53
AFHTTPRequestOperation subclass for simple XML parsing
//
// MRSimpleXMLRequestOperation.h
// Marked
//
// Created by Zachary Waldowski on 10/22/11.
// Copyright (c) 2011 Dizzy Technology. All rights reserved.
//
#import "AFHTTPRequestOperation.h"
#import "SMXMLDocument.h"
@zwaldowski
zwaldowski / Solarized.crtheme
Created January 15, 2012 18:05
Solarized Dark for CodeRunner
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundColor</key>
<string>0d2733</string>
<key>CharColor</key>
<string>cc256f</string>
<key>ClassColor</key>
<string>c1371f</string>
@zwaldowski
zwaldowski / cairo-quartz.diff
Created February 4, 2012 21:32
Compile Cairo 1.10.2 universal on Lion
diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h
index 8d001c5..bb41477 100644
--- a/src/cairo-quartz.h.old
+++ b/src/cairo-quartz.h
@@ -66,10 +66,8 @@ cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
cairo_public cairo_font_face_t *
cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
-#ifndef __LP64__
cairo_public cairo_font_face_t *
@zwaldowski
zwaldowski / DZRoundProgressView.h
Created February 5, 2012 16:48
Layer-backed pie progress view
@interface DZRoundProgressView : UIView
@property (nonatomic) CGFloat progress;
- (void)setProgress:(CGFloat)progress animated:(BOOL)animated;
@end
@zwaldowski
zwaldowski / DTCoreText.podspec
Created February 7, 2012 00:59
DTCoreText CocoaPods specification
Pod::Spec.new do |spec|
spec.name = 'DTCoreText'
spec.license = 'BSD'
spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :commit => 'origin/master' }
spec.source_files = 'Core/Source/*.{h,m,c}'
spec.clean_paths = 'Core/Test/', 'Core/DTCoreText-Info.plist', 'Core/DTCoreText-Prefix.pch', 'DTCoreText.xcodeproj/', 'Demo/', '.gitignore'
spec.frameworks = 'MediaPlayer', 'QuartzCore', 'CoreText', 'CoreGraphics', 'ImageIO'
spec.requires_arc = true
spec.homepage = 'https://github.com/Cocoanetics/DTCoreText'
spec.summary = 'Methods to allow using HTML code with CoreText.'
@zwaldowski
zwaldowski / BlocksKit+NSOrderedSet.podspec
Created March 2, 2012 15:26
NSOrderedSet for BlocksKit
Pod::Spec.new do |s|
s.name = 'BlocksKit+NSOrderedSet'
s.version = '1.0.0'
s.license = 'MIT'
s.summary = 'The NSOrderedSet block utilities you always wish you had.'
s.homepage = 'https://github.com/zwaldowski/BlocksKit'
s.author = { 'Zachary Waldowski' => 'zwaldowski@gmail.com' }
s.source = { :git => 'git://gist.github.com/1959168.git', :tag => 'origin/master' }
s.source_files = '*.{h,m}'
s.dependency 'BlocksKit'