This file contains 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
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/' | |
} | |
# Regular | |
txtblk='\e[0;30m' # Black | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
txtylw='\e[0;33m' # Yellow | |
txtblu='\e[0;34m' # Blue |
This file contains 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
+(void)displayTweetComposerWithInitialText:(NSString*)initialText | |
successBlock:(void(^)())successBlock | |
cancelBlock:(void(^)())cancelBlock | |
{ | |
if ([TWTweetComposeViewController canSendTweet]) // Check if twitter is setup and reachable | |
{ | |
AppController *app = (AppController*)[[UIApplication sharedApplication] delegate]; | |
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init]; |
This file contains 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
// | |
// NSStringCategory.h | |
// AdamoCalc | |
// | |
// Created by Tanapon Petapanpiboon on 10/11/11. | |
// Copyright 2011 toptanapon@gmail.com. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains 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
-(CGRect)boundingBoxOf:(CCNode*)node to:(CCNode*)parent | |
{ | |
CGRect box = [node boundingBox]; | |
CGPoint origin = box.origin; | |
origin.x = origin.x + parent.position.x; | |
origin.y = origin.y + parent.position.y; | |
box.origin = origin; | |
return box; | |
} |