As configured in my dotfiles.
start new:
tmux
start new with session name:
#import <SenTestingKit/SenTestingKit.h> | |
#import "SenTestCase+MethodSwizzling.h" | |
#pragma mark Fakes for Tests | |
@interface FakeMyObject : NSObject | |
/** | |
* A fake, or "stub," implementation of MyObject's +doSomething method. | |
*/ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
CGRectDivide is handy for slicing up a rectangle.
Example of getting a slice and the remaining area of a rectange.
CGRect rect = CGRectMake(0, 0, 240, 150);
CGRect remainder, slice;
CGRectDivide(rect, &slice, &remainder, 120, CGRectMinYEdge);
/*/../bin/ls > /dev/null | |
COMPILED=${0%.*} | |
clang $0 -o $COMPILED -framework Foundation; | |
$COMPILED; rm $COMPILED; exit; | |
*/ | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) |
TLDR | |
If you want the simplest option just start /** [content] */ slashes in your header files. Do it before the @implementation for class comments and above methods for method documentation. | |
Doing this is the minimal for support in LLVM and Appledoc, which means you get CocoaDocs & XCode support. | |
Not TLDR | |
Good examples: | |
https://github.com/marcransome/MRBrew/blob/master/MRBrew/MRBrew.h | |
https://github.com/AFNetworking/AFNetworking/blob/master/AFNetworking/AFHTTPClient.h |
static UIImage * UIImageForSwatchOfColorWithSize(UIColor *color, CGSize size) { | |
UIImage *image = nil; | |
CGRect rect = CGRectMake(0.0f, 0.0f, size.width, size.height); | |
UIGraphicsBeginImageContext(rect.size); | |
{ | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(c, [color CGColor]); |
description "Starts a SimpleHTTPServer to host 1 Password Anywhere" | |
author "Ivan De Marino <[email protected]>" | |
version "1.0.0" | |
# When to start/stop | |
start on runlevel [2345] | |
stop on runlevel [016] | |
# Keep it running | |
respawn |
#!/bin/bash | |
set -e | |
_xcrun() { | |
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer \ | |
xcrun -sdk iphonesimulator \ | |
"$@" | |
} |