This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef ENABLE_DEBUG | |
#define DebugLog(format, args...) \ | |
NSLog(@"%s, line %d: " format "\n", \ | |
__func__, __LINE__, ## args); | |
#else | |
#define DebugLog(format, args...) do {} while(0) | |
#endif | |
// sample use | |
DebugLog("number: %d ; class %p", count, className); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// read plist | |
NSString *errorDesc = nil; | |
NSPropertyListFormat format; | |
NSString *plistPath; | |
NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | |
plistPath = [rootPath stringByAppendingPathComponent:@"Pexplorer.plist"]; | |
NSString *originalPlistPath; | |
originalPlistPath = plistPath; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from kencochrane.net | |
emacs /opt/django/.bashrc | |
# | |
# User specific aliases and functions | |
has_virtualenv() { | |
if [ -e .venv ]; then | |
deactivate >/dev/null 2>&1 | |
source bin/activate | |
fi |
NewerOlder