Skip to content

Instantly share code, notes, and snippets.

View hezi's full-sized avatar

Jorge (Hezi) Cohen hezi

View GitHub Profile
@hezi
hezi / gist:2866995
Created June 4, 2012 07:40
Log all messages in Objective-C
#import <objc/runtime.h>
(void)instrumentObjcMessageSends(YES); //to start
(void)instrumentObjcMessageSends(NO); //to stop
// print result: tail -100f /tmp/msgSends-XXXX
// Source: http://bonto.ch/blog/2012/05/30/log-all-messages-in-objective-c/
@hezi
hezi / prefixer.py
Created May 20, 2012 10:24 — forked from drewmccormack/prefixer.py
Change the prefix of a Cocoa project
#!/usr/bin/env python
#---------
# Script to change the prefix of a framework
#---------
import os
import re
import string
@hezi
hezi / gist:2699753
Created May 15, 2012 07:29
Open in finder the directory of an app running in simulator
# Usage: add to your .bashrc / .zshrc / whatever
# run like this - appdir <appname>
appdir() {
ps ax | grep $1.app | grep -v grep | awk '{print "\""$5" "$6" "$7"\""} ' | sed "s/$1\.app\/$1//g" | xargs open
}