This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
// | |
// © 2008 Eugene Solodovnykov | |
// http://idevblog.info/mobileprovision-files-structure-and-reading/ | |
// | |
#import <Foundation/Foundation.h> | |
int main (int argc, const char * argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!/usr/bin/env bash | |
# Generates gource video (h.264) out of multiple repositories. | |
# Pass the repositories in command line arguments. | |
# Example: | |
# <this.sh> /path/to/repo1 /path/to/repo2 | |
RESOLUTION="1600x1080" | |
outfile="gource.mp4" | |
i=0 |
// | |
// LOOProfiling.h | |
// | |
// Created by Marcin Swiderski on 4/12/12. | |
// Copyright (c) 2012 Marcin Swiderski. All rights reserved. | |
// | |
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// |
// ImagePreloadingViewController - An iOS view controller for trying out different | |
// UIImage preloading strategies. Results for 1 MB png on iPhone 4S: | |
// - No preload: drawing the image right away (80 ms) | |
// - Header preload: getting the width (10 ms) and then drawing (100 ms) | |
// - Data preload: getting the data (110 ms) and then drawing (75 ms) | |
// - Draw preload: drawing it once (100 ms) and then again (20 ms) | |
// In short: preload a UIImage by drawing it. | |
// License: BSD | |
// Author: Leonard van Driel, 2012 |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillHide:) |
// | |
// FDRCollectionViewCell.h | |
// | |
// | |
// Created by Brent Royal-Gordon on 7/10/13. | |
// | |
// | |
#import <UIKit/UIKit.h> |
// | |
// RSTimingFunction.h | |
// | |
// Created by Raphael Schaad on 2013-09-28. | |
// This is free and unencumbered software released into the public domain. | |
// | |
#import <UIKit/UIKit.h> |
CGFloat ScaleToAspectFitRectInRect(CGRect rfit, CGRect rtarget) | |
{ | |
// first try to match width | |
CGFloat s = CGRectGetWidth(rtarget) / CGRectGetWidth(rfit); | |
// if we scale the height to make the widths equal, does it still fit? | |
if (CGRectGetHeight(rfit) * s <= CGRectGetHeight(rtarget)) { | |
return s; | |
} | |
// no, match height instead | |
return CGRectGetHeight(rtarget) / CGRectGetHeight(rfit); |
comma script import ~/lldb/subl.py | |
comma script add -f subl.subl subl |