This file contains 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 UIImage (Extensions) | |
+ (UIImage*)blankImage:(CGSize)_size; | |
+ (UIImage*)blankImage:(CGSize)_size withColor:(UIColor*)_color; | |
@end |
This file contains 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> | |
#import "NSManagedObject+DataManager.h" | |
@interface DataManager : NSObject | |
@property (nonatomic, strong, readonly) NSManagedObjectModel* managedObjectModel; | |
@property (nonatomic, strong, readonly) NSManagedObjectContext* managedObjectContext; | |
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator* persistentStoreCoordinator; | |
@property (nonatomic, strong) NSURL* modelURL; | |
@property (nonatomic, strong) NSString* persistantStoreName; |
This file contains 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
- (UIImage*)blendedImage { | |
GPUImagePicture* bluredImage = [[GPUImagePicture alloc] initWithImage:self.filterImage]; | |
GPUImageFilterGroup* blurFilterGroup = [[GPUImageFilterGroup alloc] init]; | |
GPUImageFilter* colorOverlayfilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"WhiteColorOverlay"]; | |
GPUImageGaussianBlurFilter* gaussainBlur = [[GPUImageGaussianBlurFilter alloc] init]; | |
[gaussainBlur setBlurSize:3.0f]; | |
[blurFilterGroup addFilter:colorOverlayfilter]; | |
[blurFilterGroup addFilter:gaussainBlur]; |
This file contains 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
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; } |
This file contains 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> | |
@protocol ParameterSliderViewDelegate; | |
@interface ParameterSliderView : UIView | |
@property(nonatomic, weak) id<ParameterSliderViewDelegate> delegate; | |
@property(nonatomic, strong) UIView* parameterView; | |
@property(nonatomic, strong) UIView* parameterViewBorder; | |
@property(nonatomic, strong) UIPanGestureRecognizer* panGesture; |
This file contains 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 "NSObject+Extensions.h" | |
@interface UIView (Extensions) | |
+ (UIView*)loadView:(Class)_viewClass; | |
@end | |
@implementation UIView (Extensions) |
This file contains 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 <objc/runtime.h> | |
@interface NSObject (Extensions) | |
- (NSString*)className; | |
@end | |
@implementation NSObject (Extensions) |
This file contains 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 NSArray (Extensions) | |
- (NSArray *)mapObjectsUsingBlock:(id (^)(id obj, NSUInteger idx))block; | |
@end | |
@implementation NSArray (Extensions) | |
- (NSArray *)mapObjectsUsingBlock:(id (^)(id obj, NSUInteger idx))block { | |
NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]]; |
This file contains 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
def symbolize_keys!(thing) | |
case thing | |
when Array | |
thing.each{|v| symbolize_keys!(v)} | |
when Hash | |
thing.symbolize_keys! | |
thing.values.each{|v| symbolize_keys!(v)} | |
end | |
end |
This file contains 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'fog' | |
config = YAML.load(File.read(ARGV[0])) | |
volumes_to_snap = YAML.load(File.read(ARGV[1])) | |
time = Time.now | |
puts "\nCreating snaps #{time.to_s}" |