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
- (UIViewController*)topMostController | |
{ | |
UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; | |
while (topController.presentedViewController) { | |
topController = topController.presentedViewController; | |
} | |
return topController; | |
} |
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
output=$(curl -sA Mozilla http://www.google.com/search?q=$(echo "1 foot in meters" | sed "s/ /+/g") | grep -E '[0-9]+(\.+[0-9]+)?\s[a-zA-z]+\s=\s[0-9]+(\.+[0-9]+)?\s[a-zA-z]+' -A 0 -B 0 -o) && echo -e "tell app \"System Events\" to display dialog \"$output\"" | osascript |
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
open /Applications/Google\ Chrome.app/ --args --incognito |
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
zip -r -s 100m archive.zip FolderName/ |
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 <UIKit/UIKit.h> | |
@interface UILabel (ColorInRanges) | |
- (void)changeTextColor:(UIColor *)color forStringsWithPattern:(NSString *)pattern; | |
@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
#import <Foundation/Foundation.h> | |
@interface NSString (RegularExpressionSearch) | |
- (NSArray *)stringRangesWithRegularExpressionPattern:(NSString *)patternString; | |
@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
<?php | |
exec("stty -f /dev/tty.usbmodemfa131 raw speed 9600"); | |
exec("echo '".$_GET['status']."' > /dev/tty.usbmodemfa131"); |
NewerOlder