Install dependencies and run tests
rake
Dependencies, tests, archive in Release configuration and upload to TestFlight
rake testflight
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
branch_count=15 | |
alias b="git for-each-ref --sort=-committerdate refs/heads/ --count=$branch_count --format='%(objectname:short)\\%(refname:short)\\%(contents:subject)' | column -ts'\\'" | |
function bco { | |
# display recent branches | |
b | cat -n; | |
# read which the user wants to checkout | |
echo -n "checkout branch number: "; | |
read line; |
#import "SPVMainViewController.h" | |
@implementation SPVMainViewController | |
{ | |
UIView *_weightView; | |
UIPanGestureRecognizer *_recog; | |
} | |
- (void)viewDidLoad | |
{ |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
import praw # simple interface to the reddit API, also handles rate limiting of requests | |
import re | |
from collections import deque | |
from time import sleep | |
USERNAME = "Your username here" | |
PASSWORD = "Your password here" | |
USERAGENT = "Your useragent string here. It should include your /u/username as a courtesy to reddit" | |
r = praw.Reddit(USERAGENT) |
# Compress git repos (git gc) recursively | |
# Use as at will, by @nvk | |
gspace(){ | |
for gitdir in `find ./ -name .git`; | |
do | |
workdir=${gitdir%/*}; | |
hrline 44; # see http://gist.github.com/nvk/5340820 | |
echo $workdir; | |
git --git-dir=$gitdir --work-tree=$workdir gc --aggressive; |
# Open github project and issues page | |
# PS: I'm not a dev, I'm sure there is better ways of writing this. | |
# use at will, by @nvk | |
gop(){ | |
url=$(git remote -v | perl -n -e 'm{:(.+?).git} && print $1,"\n"' | uniq ); | |
open "http://github.com/$url" | |
} | |
gip(){ | |
url=$(git remote -v | perl -n -e 'm{:(.+?).git} && print $1,"\n"' | uniq ); |
/** | |
* Several macros simplifying use of weak references to self inside blocks | |
* which goal is to reduce risk of retain cycles. | |
* | |
* Example: | |
* @code | |
@interface Example : NSObject{ | |
int _i; | |
} |