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
# (File moved to https://github.com/ole/Storyboard-Strings-Extraction) |
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
class people::jfryman { | |
# Applications | |
include chrome::stable | |
include onepassword | |
include dropbox | |
include alfred | |
include macvim | |
include zsh | |
include homebrew | |
include fitbit |
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/sh | |
# if you're using ZSH, change the shebang above to "#!/bin/zsh -i" | |
if [ ${#} -ne 2 ]; then | |
echo >&2 Usage: $(basename ${0}) old-version new-version | |
exit 1 | |
fi | |
home_path=$(cd ~; pwd -P) | |
old_version=${1} |
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/sh | |
# Launch application using ios-sim and set up environment to inject test bundle into application | |
# Source: http://stackoverflow.com/a/12682617/504494 | |
if [ "$RUN_APPLICATION_TESTS_WITH_IOS_SIM" = "YES" ]; then | |
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION" | |
environment_args="--setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle=$test_bundle_path --setenv XCInjectBundleInto=$TEST_HOST" | |
ios-sim launch $(dirname $TEST_HOST) $environment_args --args -SenTest All $test_bundle_path | |
echo "Finished running tests with ios-sim" |
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
[super viewWillAppear:animated]; | |
NSManagedObjectContext *context = [NSManagedObjectContext MR_contextForCurrentThread]; | |
// ここで、FEUnitはFEClanに対してclanというrelationを持っているとする | |
// FEClanはFEUnitに対してunitsというrelationを持っているとする | |
// NSManagedObjectIDで検索 | |
// Property clanID must be permanent since a temporary ID cannot handle this query | |
self.fetchedResultsController = [FEUnit MR_fetchAllGroupedBy:nil | |
withPredicate:[NSPredicate predicateWithFormat:@"clan == %@", self.clanID] |
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
// Created by Nick Snyder on 11/13/12. | |
// https://gist.github.com/nicksnyder/4075682 | |
// http://stackoverflow.com/questions/12927027/uicollectionview-flowlayout-not-wrapping-cells-correctly-ios | |
// NDCollectionViewFlowLayout.h | |
@interface NDCollectionViewFlowLayout : UICollectionViewFlowLayout | |
@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
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]); | |
}]; |
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
@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
#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]; | |
} | |
} | |