Skip to content

Instantly share code, notes, and snippets.

View zbyhoo's full-sized avatar

zbyhoo zbyhoo

  • Gamesture
  • Poland, Katowice
View GitHub Profile
@zbyhoo
zbyhoo / gist:1266907
Created October 6, 2011 09:06
Pretty nice way to find UIViewController of UIView using category
@interface UIView (FindUIViewController)
- (UIViewController *) firstAvailableUIViewController;
- (id) traverseResponderChainForUIViewController;
@end
@implementation UIView (FindUIViewController)
- (UIViewController *) firstAvailableUIViewController
@zbyhoo
zbyhoo / gist:1372918
Created November 17, 2011 11:06
Removing all files that will not be source controlled from Library dir of Unity3D project
rm $(ls * | grep -v 'EditorBuildSettings.asset\|InputManager.asset\|ProjectSettings.asset\|QualitySettings.asset\|TagManager.asset\|TimeManager.asset\|AudioManager.asset\|DynamicsManager.asset\|NetworkManager.asset')
@zbyhoo
zbyhoo / gist:1450703
Created December 9, 2011 08:11
print sorted by size list of all files/folders in current directory in human readable form
du -s * | sort -nr | cut -f2- | xargs -I {} du -hs {}
@zbyhoo
zbyhoo / build_tesseract.sh
Created March 19, 2012 20:50
Downloads and compiles Tesseract OCR library for iOS
#!/bin/sh
# build.sh
GLOBAL_OUTDIR="`pwd`/dependencies"
LOCAL_OUTDIR="./outdir"
LEPTON_LIB="`pwd`/leptonica-1.68"
TESSERACT_LIB="`pwd`/tesseract-3.01"
IOS_BASE_SDK="5.1"
IOS_DEPLOY_TGT="4.3"