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
#svnやgitのリビジョン,ビルド番号をplistに自動的に埋め込む http://sonson.jp/?p=2241 | |
git_revision=$(git show --format='%h' -s) | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleGitRevision $git_revision" "$INFOPLIST_FILE" |
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
#!/bin/bash | |
### User Settings (things you must set) | |
## Location of the dnscurl.pl script | |
DNSCurl="/path/to/route53DynDNS/dnscurl.pl" | |
## The host name you wish to update/create | |
myHostName="*" | |
## Zone/domain in which host (will) reside(s) | |
myDomainName="example.com" |
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
- (UIImage *)imageWithColor:(UIColor *)color { | |
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); | |
UIGraphicsBeginImageContext(rect.size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(context, [color CGColor]); | |
CGContextFillRect(context, rect); | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
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
#import <Foundation/Foundation.h> | |
@interface UILabel (ktlib) | |
- (void) fitSizeOfFont:(UIFont *)font; | |
@end |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
import com.actionbarsherlock.app.ActionBar; | |
import com.actionbarsherlock.app.ActionBar.Tab; | |
import com.actionbarsherlock.app.SherlockActivity; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.graphics.drawable.Drawable; | |
import android.util.Log; | |
import android.view.Menu; |
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
#pragma mark - help functions | |
-(void) addChildViewControllerWithIdentifier:(NSString*)identifier inArea:(CGRect)rect closeOtherChildView:(BOOL)isClose toView:(UIView*) toView{ | |
if (isClose) { | |
for (UIViewController* vc in self.childViewControllers) { | |
[vc.view removeFromSuperview]; | |
[vc removeFromParentViewController]; | |
} | |
} | |
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
@interface TestView : UIView | |
@end | |
@implementation TestView | |
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event | |
{ | |
UIView *view = [super hitTest:point withEvent:event]; | |
if(view == self) { | |
return nil; |
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
// | |
// CustomAlertView.h | |
// CustomAlert | |
// | |
// Created by masaki.fuke on 2012/08/23. | |
// Copyright (c) 2012年 masaki.fuke. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
RAC(self.layer.contents) = [[[[[[RACAble(self.rowView) select:^(YourRowView *rowView) { | |
return RACAble(rowView, selected); | |
}] switch] distinctUntilChanged] injectObjectWeakly:self] | |
doNext:^(RACTuple *x) { | |
CABasicAnimation *fade = [CABasicAnimation animationWithKeyPath:@"contents"]; | |
fade.duration = 0.15; | |
[[x.last layer] addAnimation:fade forKey:@"animateContents"]; | |
}] select:^id(RACTuple *x) { | |
return ([x.first boolValue] ? [self highlightedGradient] : [self standardGradient]); | |
}]; |