This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)initWithBeer:(BHBeer *)beer | |
{ | |
NSAssert(beer != nil, @"beer is required"); | |
self = [super init]; | |
if (self) { | |
self.beer = beer; | |
} | |
return self; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
# Our sample categories | |
categories = [] | |
categories << 'Advertising' | |
categories << 'Bank Fees' | |
categories << 'Computer Hardware' | |
categories << 'Computer Software' | |
categories << 'Conferences' | |
categories << 'Hosting' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SSRatingPickerScrollView.m | |
- (void)layoutSubviews { | |
[super layoutSubviews]; | |
CGFloat height = [_reviewTextView sizeThatFits:CGSizeMake(self.frame.size.width, 2000.0f)].height + 91.0f; | |
height = fmaxf(height, 191.0f); | |
height = height + 216.0f; // add keyboard height | |
self.contentSize = CGSizeMake(self.frame.size.width, height); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm adding strip_attributes to my Rails models to help strip | |
# leading/trailing whitespace as well as make sure empty strings | |
# are saved as null in the DB. This migration does a .save! on | |
# all my object. I'd love to DRY up this migration as there are | |
# actually way more classes in the real project. Any thoughts? | |
class SaveAllObjectsToRunStripAttributes < ActiveRecord::Migration | |
class CategoryGroup < ActiveRecord::Base | |
strip_attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The following is an AppleScript function ProfitTrain will call when you choose "Email Client..." | |
-- under an invoice. Before using the built in AppleScript ProfitTrain will look for | |
-- this user AppleScript file at: | |
-- /Users/[you]/Library/Application Support/ProfitTrain/email_invoice_using_user_script.scpt | |
-- By edting this file you can further customize the email with different subject lines, etc. | |
-- and/or use an alternative email client that is not supported by Billable by default. | |
-- Script using Apple's Postbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What Zorn did: | |
* Removed all the CAPITAL <B> and </B> tags. | |
* Replaced all the <b> with <strong> | |
* Replaced all the </b> with </strong> | |
* Replaced all the <i> with <em> | |
* Replaced all the </i> with </em> | |
BTW the open counts on those didn't 100% match the close counts. If wanted I could try to find out which files have more opens than closes or more closes than opens for manual cleanup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mike Zornek | |
// I use these a ton for quick scans of strings: | |
@interface NSString (CBAdditions) | |
- (BOOL)cb_containsString:(NSString *)aString; | |
- (BOOL)cb_containsString:(NSString *)aString ignoringCase:(BOOL)flag; | |
@end | |
@implementation NSString (CBAdditions) | |
- (BOOL)cb_containsString:(NSString *)aString |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: objectsWillLoad | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: Query for Table | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: objectsWillLoad | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: Query for Table | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: objectsWillLoad | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: Query for Table | |
Jan 16 10:43:43 unknown BrooklynMuseum[610] <Warning>: objectsWillLoad | |
Jan 16 10:43:44 unknown BrooklynMuseum[610] <Warning>: Query for Table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you edit an invoice there is a status pulldown. You can change this to Estimate and it'll will make things work right. | |
Sadly you can't "publish" an estimate (else it would be turned back into an "sent invoice") so use the context menu via right click to access publish actions directly. | |
http://media.clickablebliss.com/support/images/right_click_actions.png | |
In the future I'm hopeful to make estimate first class objects. | |
Hope this info helps. Let me know if you have any follow up questions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The following is an AppleScript function ProfitTrain will call when you choose "Email Client..." | |
-- under an invoice. Before using the built in AppleScript ProfitTrain will look for | |
-- this user AppleScript file at: | |
-- /Users/[you]/Library/Application Support/ProfitTrain/email_invoice_using_user_script.scpt | |
-- By edting this file you can further customize the email with different subject lines, etc. | |
-- and/or use an alternative email client that is not supported by Billable by default. | |
-- Script using Mailplane |