by Marco Cattai
Search all the files/folder with that name and remove them
find . -name "FILE-TO-FIND"-exec rm -rf {} \;
| @interface NSFileManager (DoNotBackup) | |
| - (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL; | |
| @end |
| // | |
| // UIView+ADBSubviews.h | |
| // iHarmony | |
| // | |
| // Created by Alberto De Bortoli on 06/08/13. | |
| // Copyright (c) 2013 iHarmony. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |
| + (BOOL)currentVersionIsGreaterOrEqualThan:(NSString *)baseVersion | |
| { | |
| // baseVersion is something like @"1.0.5" | |
| NSArray *baseVersionComponents = [baseVersion componentsSeparatedByString:@"."]; | |
| NSString *version = [UIDevice currentDevice].systemVersion; | |
| NSArray *components = [version componentsSeparatedByString:@"."]; | |
| // the number of components of both version must be the same | |
| for (int i = 0; i < [components count]; i++) { |
| #define FutureConditionToBreakWithTimeout(_condition_, _duration_) \ | |
| NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:_duration_]; \ | |
| while (!_condition_ && [loopUntil timeIntervalSinceNow] > 0) { \ | |
| [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:loopUntil]; \ | |
| } |
| // | |
| // MoreWarnings.xcconfig | |
| // | |
| // Created by Steven Fisher: | |
| // http://tewha.net/2010/11/xcode-warnings/ | |
| // See also: | |
| // http://boredzo.org/blog/archives/2009-11-07/warnings | |
| // | |
| GCC_WARN_CHECK_SWITCH_STATEMENTS = YES |
| self.profilePictureView.profileID = user.id; | |
| double delayInSeconds = 2.0; | |
| dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
| dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
| UIImageView *imageView = nil; | |
| for (UIView *subview in [self.profilePictureView subviews]) { | |
| if ([subview isKindOfClass:[UIImageView class]]) { | |
| imageView = (UIImageView *)subview; |
| #!/usr/bin/env ruby | |
| File.open("your_file.md", 'r') do |f| | |
| f.each_line do |line| | |
| forbidden_words = ['Table of contents', 'define', 'pragma'] | |
| next if !line.start_with?("#") || forbidden_words.any? { |w| line =~ /#{w}/ } | |
| title = line.gsub("#", "").strip | |
| href = title.gsub(" ", "-").downcase | |
| puts " " * (line.count("#")-1) + "* [#{title}](\##{href})" |
| @synchronized(self) { | |
| NSLog(@"%i", 1); | |
| dispatch_queue_t queue = dispatch_queue_create("com.albertodebortoli.serial_queue", DISPATCH_QUEUE_SERIAL); | |
| dispatch_sync(queue, ^{ | |
| NSLog(@"%i", 2); | |
| @synchronized(self) { | |
| NSLog(@"%i", 3); | |
| } | |
| NSLog(@"%i", 4); | |
| }); |
| - (void)test_Given<#state#>_When<#action#>_Then<#result#> { | |
| XCTAssert(); | |
| } |