Skip to content

Instantly share code, notes, and snippets.

View zorn's full-sized avatar
💸
Elixir Contractor For Hire

Mike Zornek zorn

💸
Elixir Contractor For Hire
View GitHub Profile
// .h
#import <Cocoa/Cocoa.h>
@interface BusinessEditorController : NSObject
{
NSTextField *_defaultTax1RateTextField;
NSTextField *_defaultTax2RateTextField;
NSTextField *_defaultHourlyRateTextField;
NSTextField *_defaultMileageCostTextField;
}
// Core Data question...
// So I have a unit test like this:
- (void)testNewClientFromBusiness
{
PTBusiness *business = [modelController newBusiness];
STAssertTrue([[business clients] count] == 0, @"is actually %d", [[business clients] count]);
PTClient *client = [business newClient];
STAssertTrue([business isEqual:[client business]], nil);
@zorn
zorn / userChrome.css
Created October 19, 2010 18:03
For Postbox on Mac, helps make mail list easier to read.
/* Adjust size of font use in Message Pane */
#threadTree treechildren:-moz-tree-cell-text {
font-size: 11pt !important;
}
/* Increase size of rows in Message Pane */
#threadTree treechildren:-moz-tree-row {
height: 22px !important;
}
@zorn
zorn / gist:782931
Created January 17, 2011 15:02
test
this isa test
Features:
Access your public Github gists from the menu bar.
Copy content from the clipboard to a gist with a keyboard shortcut (CTRL-OPT-CMD-V).
Coming Soon:
Access to private gists.
Paste to private gists.
Auto-refresh of gist list.
- (NSString *)tokenField:(NSTokenField *)tokenField editingStringForRepresentedObject:(id)representedObject
{
if ([representedObject isKindOfClass:[NSString class]])
{
return representedObject;
}
else
{
return nil; // nil disallows editing
}
# February CocoaHeads Meeting!
The next [Philly CocoaHeads](http://phillycocoa.org) meeting will be Thursday, February 17th 7-9pm at [Indy Hall](http://indyhall.org). Post-meeting drinks commence afterwords; [National Mechanics](http://www.nationalmechanics.com/) is our usual hangout.
You'll need to be buzzed up, but if you are having any trouble feel free to call MikeZ's cell (267-563-0616) and we'll be sure to get you in.
Pizza and refreshments will be provided by our sponsor, The Neat Company. Be sure to thank them.
**Please [RSVP for the February 2011 meeting](https://spreadsheets.google.com/a/phillycocoa.org/viewform?hl=en&ndplr=1&formkey=dEQ2OUNzaHg4Qm1uaDJ1RHNVWklfSlE6MA#gid=0).**
@zorn
zorn / gist:853338
Created March 3, 2011 19:24
March CocoaHeads Meeting!

March CocoaHeads Meeting!

The next Philly CocoaHeads meeting will be Thursday, March 10th 7-9pm at Indy Hall. Post-meeting drinks commence afterwords; National Mechanics is our usual hangout.

You'll need to use the intercom to get in (#022). If you are having any trouble feel free to call MikeZ's cell (267-563-0616) and we'll be sure to get you in.

We'll usually all chip in and order some pizza and refreshments, so if you can bring a few bucks for that please do.

Please RSVP if you plan to attend to help us plan out our space needs.

#define CCCA(x) [[x copy] autorelease]
...
-(void) onEnter
{
[super onEnter];
CGSize s = [[CCDirector sharedDirector] winSize];
@zorn
zorn / gist:884025
Created March 23, 2011 21:23
Playing around with mechanize to interact with websites using Ruby
require 'rubygems'
require 'mechanize'
# http://mechanize.rubyforge.org/mechanize/EXAMPLES_rdoc.html
# http://stackoverflow.com/questions/4360043/using-wwwmechanize-to-download-a-file-to-disk-without-loading-it-all-in-memory-f
agent = Mechanize.new
page = agent.get('http://clickablebliss.com/contact.html')
Dir.new("ReleaseNotes").each do |filename|
if File.file?("ReleaseNotes/#{filename}") and filename.include? "markdown"
if filename.include? "b" and include_betas == false
# do something
end
end
end