Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ryanslade on github.
  • I am ryanslade (https://keybase.io/ryanslade) on keybase.
  • I have a public key whose fingerprint is A1FD FA68 E383 9F1E DDA7 F0B8 E61C 6181 B8A8 DECF

To claim this, I am signing this object:

@ryanslade
ryanslade / resize
Created September 30, 2013 12:25
Example pure go image resize
package main
import (
"flag"
"fmt"
"image"
"image/jpeg"
"os"
"github.com/disintegration/imaging"
@ryanslade
ryanslade / gist:4613039
Created January 23, 2013 20:53
Go build runs out of memory
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/cov
cmd/nm
cmd/objdump
cmd/pack
cmd/prof
- (void) blockTest:(void (^)(NSString* test))success
{
success(@"Hello");
}
- (void) something
{
[self blockTest:^(NSString* result){
NSLog(@"%@", result);
}];
- (CGFloat) getTextSizeForRowAtIndexPath:(NSIndexPath*)indexPath
{
CGSize boundingSize = CGSizeMake(290, CGFLOAT_MAX);
Tweet* tweet = [tweets objectAtIndex:[indexPath row]];
if (tweet && ([tweet.text length] > 0))
{
CGFloat cellHeight = [tweet.text sizeWithFont:[UIFont fontWithName:@"Arial-BoldMT" size:17]
constrainedToSize:boundingSize