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
CGPoint CGPointApplyCATransform3D(CGPoint point, CATransform3D transform, CGPoint anchorPoint, CATransform3D parentSublayerTransform) | |
{ | |
static CALayer *sublayer, *layer; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
sublayer = [CALayer layer]; | |
layer = [CALayer layer]; | |
[layer addSublayer:sublayer]; | |
}); | |
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
#!/bin/bash | |
# Created by Håvard Fossli <hfossli@gmail.com> in 2013 | |
# Derived from Alexis Bezverkhyy <alexis@grapsus.net> in 2011 | |
# This is free and unencumbered software released into the public domain. | |
# For more information, please refer to <http://unlicense.org/> | |
# | |
# Description | |
# A bash script for splitting videos into several files using ffmpeg. | |
# |
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
#!/bin/bash | |
# Created by Håvard Fossli <hfossli@gmail.com> in 2013 | |
# This is free and unencumbered software released into the public domain. | |
# For more information, please refer to <http://unlicense.org/> | |
# | |
# Description | |
# A bash script for reversing videos using ffmpeg and sox. | |
# | |
# Keywords |
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/ruby | |
# xcode-git-commit-hash-cfbundleversion.rb | |
# Run script for Xcode to run after build / archive | |
# Updates CFBundleVersion in Info.plist file with short git commit hash | |
# | |
# This is based on | |
# http://github.com/guicocoa/xcode-git-cfbundleversion/ | |
# http://github.com/digdog/xcode-git-cfbundleversion/ | |
# http://github.com/jsallis/xcode-git-versioner | |
# http://github.com/juretta/iphone-project-tools/tree/v1.0.3 |
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> | |
extern NSString * const UIApplicationDidHideStatusBarNotification; | |
@interface IVYApplication : UIApplication | |
@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 <UIKit/UIKit.h> | |
@interface UIScrollView (ScrollsToTop) | |
+ (void)forceNewViewsDefaultValueForScrollsToTop; | |
+ (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap:(UIScrollView *)scrollView; | |
- (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap; | |
@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> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
NSUInteger iterations = 1000000; | |
{ // Regex | |
NSTimeInterval timeStart = CFAbsoluteTimeGetCurrent(); | |
NSString *result = nil; |
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 300, 200)]; | |
view.backgroundColor = [UIColor blueColor]; | |
[self.view addSubview:view]; | |
[view addObserver:self forKeyPath:@"frame" options:0 context:NULL]; |
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
#!/bin/bash | |
# Created by Håvard Fossli <hfossli@gmail.com> in 2013 | |
# This is free and unencumbered software released into the public domain. | |
# For more information, please refer to <http://unlicense.org/> | |
# | |
# Description | |
# A bash script for fetching all branches and tags of a git project as snapshots into separate folders | |
# | |
# Keywords |
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 DataObject : NSObject | |
// public properties | |
@end |
OlderNewer