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
| before do | |
| user.stub(:facebook_connected?).and_return(true) | |
| user.stub(:facebook_allows_permission?).with(anything) | |
| .and_return(true) | |
| 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
| - (void) navigateToSplitViewController{ | |
| [SVProgressHUD dismiss]; | |
| UIStoryboard *storyboard = self.storyboard; | |
| IPadSplitViewHolder *splitView = [storyboard instantiateViewControllerWithIdentifier:@"IPadSplitViewHolder"]; | |
| //[self.navigationController pushViewController:splitView animated:YES]; | |
| //self.parentViewController.view.window.rootViewController = splitView; | |
| self.view.window.rootViewController = splitView; | |
| } | |
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
| self performBlock:^{code here} afterDelay: 2.5]; | |
| [self performBlock:^{code here} afterDelay: 10]; |
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
| for i in {0..255} ; do | |
| printf "\x1b[38;5;${i}mcolour${i}\n" | |
| done |
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
| if (weakSelf.followers.count==1) { | |
| [weakSelf.tableView reloadData]; | |
| }else { | |
| NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; | |
| [weakSelf.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; | |
| // refresh index path | |
| dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_current_queue(), ^{ | |
| [weakSelf.tableView reloadData]; | |
| }); |
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
| // Communication is done by ansci | |
| const int FIRST_ON = '0'; | |
| const int SECOND_ON = '1'; | |
| const int ALL_ON = '2'; | |
| const int ALL_OFF = '3'; | |
| boolean stop = false; | |
| struct led{ | |
| int delayLength; |
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
| #include <Wire.h> | |
| void setup() { | |
| Wire.begin(); | |
| Serial.begin(9600); | |
| } | |
| int reading = 0; |
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
| - (void)drawRect:(CGRect)rect { | |
| [[UIImage imageNamed:@"top_bg_pattern.png"] drawAsPatternInRect:rect]; | |
| [self drawShadowsWithHeight:10 opacity:0.3 InRect:rect forContext:UIGraphicsGetCurrentContext()]; | |
| } | |
| - (void)drawShadowsWithHeight:(CGFloat)shadowHeight opacity:(CGFloat)opacity InRect:(CGRect)rect forContext:(CGContextRef)context { | |
| CGColorSpaceRef space = CGBitmapContextGetColorSpace(context); | |
| CGFloat topComponents[8] = {0, 0, 0, opacity, 0, 0, 0, 0}; |
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
| // | |
| // SignInViewControllerSpecs.m | |
| // Taskworld | |
| // | |
| // Created by Warut Surapat on 11/8/13. | |
| // Copyright 2013 Taskworld. All rights reserved. | |
| // | |
| #import "Kiwi.h" | |
| #import "KIFUITestActor+TWTester.h" |