Skip to content

Instantly share code, notes, and snippets.

View tcirwin's full-sized avatar

Therin Irwin tcirwin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tcirwin on github.
  • I am tci (https://keybase.io/tci) on keybase.
  • I have a public key ASBa8lz5TaZw8AlFQiQgy76IE4xTklRAmyyQsVNQAXGY_wo

To claim this, I am signing this object:

@tcirwin
tcirwin / ViewUtils.m
Last active April 8, 2018 01:53
Load view from xib using class name
+ (id)loadViewForClass:(Class)klass {
NSString *klassName = NSStringFromClass(klass);
NSArray *views = [[NSBundle mainBundle] loadNibNamed:klassName
owner:nil
options:nil];
for (id view in views) {
if ([view isKindOfClass:klass]) {
return view;
}
}
@tcirwin
tcirwin / gitfix.sh
Created August 25, 2015 18:51
gitfix - open all unmerged files in git editor
EDITOR=`git config --get --global core.editor`
alias gitfix="$EDITOR `git diff --name-status --diff-filter=U | awk 'NF>1{printf \"%s \", \$NF}'`"