Change type enumeration
typedef NS_ENUM(NSUInteger, SZSTextChangeType) {
SZSTextChangeTypeDelete,
SZSTextChangeTypeInsert,
SZSTextChangeTypeReplace
};
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# Existent podfile | |
current_directory="${PWD}" | |
current_podfile_path="$current_directory/Podfile" | |
current_directory_md5=`md5 -q -s "$current_directory"` | |
temporary_podfile_path="/tmp/${current_directory_md5}.podfile" | |
echo "Comparing Podfiles\nOld: $current_podfile_path\nNew: $temporary_podfile_path" | |
# Comparing it to the new Podfile | |
comparison_result=`comm -1 -3 -i $current_podfile_path $temporary_podfile_path` |
- (void)_perform:(id)sender { | |
NSString *identifier = self.destinationViewControllerIdentifier; | |
UIViewController *sourceViewController = self.viewController; | |
UIStoryboard *storyboard = sourceViewController.storyboard; | |
UIViewController *destinationViewController = [storyboard instantiateViewControllerWithIdentifier:identifier]; | |
UIStoryboardSegue *segue = [self segueWithDestinationViewController:destinationViewController]; | |
[sourceViewController prepareForSegue:segue | |
sender:destinationViewController]; | |
[segue perform]; | |
} |
Change type enumeration
typedef NS_ENUM(NSUInteger, SZSTextChangeType) {
SZSTextChangeTypeDelete,
SZSTextChangeTypeInsert,
SZSTextChangeTypeReplace
};
#!/bin/sh | |
info_plist="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
spot_environment=$(echo "$GCC_PREPROCESSOR_DEFINITIONS" | sed -n 's/^.*ENVIRONMENT=\(.\)/\1/p') | |
facebook_url="fb0000000000${spot_environment}" | |
current_facebook_url=$(/usr/libexec/PlistBuddy -c "Print CFBundleURLTypes:0:CFBundleURLSchemes:0" "$info_plist") |
- (AFHTTPRequestOperation *)imageFetchOperationForCategoryWithURL:(NSURL *)URL success:(void(^)(AFHTTPRequestOperation *operation, id response))success failure:(void(^)(AFHTTPRequestOperation *operation, NSError *error))failure | |
{ | |
static NSString *categoriesCacheDirectory; | |
static NSCache *inMemoryCache; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
inMemoryCache = [[NSCache alloc] init]; | |
categoriesCacheDirectory = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]; | |
categoriesCacheDirectory = [categoriesCacheDirectory stringByAppendingPathComponent:@"location_icons"]; |
# Adding original repository as a fork | |
git remote add --track master forked_from git://github.com/user/repo.git | |
# Fetch from remote called forked_from | |
git fetch forked_from | |
# Merging codeabase | |
git merge forked_from/master |