Skip to content

Instantly share code, notes, and snippets.

View rcdilorenzo's full-sized avatar
🙌
Working in His Kingdom (Col 3:17)

Christian Di Lorenzo rcdilorenzo

🙌
Working in His Kingdom (Col 3:17)
View GitHub Profile
@rcdilorenzo
rcdilorenzo / PlayingCard.m
Created July 25, 2012 15:48
Draw Card from Image
- (void)drawFromPosition:(CGPoint)location view:(UIView *)view size:(CGFloat)size {
UIImage *cardImage = [UIImage imageNamed:[NSString stringWithFormat:@"%@%@.png", [[self.suit substringToIndex:1] lowercaseString], [[self.rank substringToIndex:1] lowercaseString]]];
UIImageView *cardImageView = [[UIImageView alloc] initWithFrame:CGRectMake(location.x, location.y, cardImage.size.width*size, cardImage.size.height*size)];
[cardImageView setImage:cardImage];
[view addSubview:cardImageView];
}
@rcdilorenzo
rcdilorenzo / rspec_conversion_helper.rb
Created July 18, 2012 16:04
Ruby Test Unit to Rspec Helper
def assert_equal(a, b)
puts "#{a}.should == #{b}"
end
def assert_not_nil(a)
puts "#{a}.should_not == nil"
end
def assert_raise(*all_args)
puts "Cannot convert assert_raise"