This file contains 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
# xcode noise | |
build/* | |
*.pbxuser | |
*.mode1v3 | |
*.perspectivev3 | |
# old skool | |
.svn | |
# osx noise |
This file contains 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
#!/usr/bin/env ruby | |
# | |
# build AdHoc package | |
# | |
# Install: | |
# sudo gem install mechanize | |
# | |
# Usage: | |
# ruby build-adhoc.rb adhoc.yaml |
This file contains 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
- (CGImageRef)CGImageRotatedByAngle:(CGImageRef)imgRef angle:(CGFloat)angle | |
{ | |
CGFloat angleInRadians = angle * (M_PI / 180); | |
CGFloat width = CGImageGetWidth(imgRef); | |
CGFloat height = CGImageGetHeight(imgRef); | |
CGRect imgRect = CGRectMake(0, 0, width, height); | |
CGAffineTransform transform = CGAffineTransformMakeRotation(angleInRadians); | |
CGRect rotatedRect = CGRectApplyAffineTransform(imgRect, transform); |
This file contains 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
************** NSString+URIQuery.h ****************************************** | |
// Created by Jerry Krinock | |
// Posted Thu, 29 Jan 2009 | |
// http://lists.apple.com/archives/cocoa-dev/2009/Jan//msg02349.html | |
#import <Foundation/Foundation.h> | |
@interface NSString (URIQuery) |
This file contains 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
#!/bin/bash | |
# run this in ~/Library/Logs/CrashReporter/MobileDevice | |
pth=${0%*/*} | |
cd "$pth" | |
#echo "$@" | |
if [ -z "$1" ]; then | |
find . -name "*.crash" | while read file; | |
do | |
echo "converting $file" |
This file contains 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
// recursively apply typeface to our textviews | |
static final void setTypeface(ViewGroup viewGroup, Typeface typeface) | |
{ | |
if (viewGroup == null) return; | |
int children = viewGroup.getChildCount(); | |
Log.d(TAG, "setTypeface " + viewGroup + " : " + children); | |
for (int i=0; i<children; i++) | |
{ | |
View view = viewGroup.getChildAt(i); |
This file contains 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
static final class TouchyWebView extends WebView | |
{ | |
public TouchyWebView(Context context) { | |
super(context); | |
} | |
@Override | |
public boolean onTouchEvent(MotionEvent event){ | |
requestDisallowInterceptTouchEvent(true); | |
return super.onTouchEvent(event); |
This file contains 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
#!/bin/bash | |
if [ -e aps_production.cer ] | |
then | |
echo "Converting production push certificate" | |
security -v create-keychain -p '' temp-production.keychain | |
security -v import aps_production.cer -k temp-production.keychain | |
security -v export -k temp-production.keychain -f pkcs12 -P '' -o push-production.p12 | |
security -v delete-keychain temp-production.keychain | |
fi |
This file contains 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
curl -v -c ./flurry.jar \ | |
--location-trusted \ | |
-d "loginEmail=$USERNAME&loginPassword=$PASSWORD&rememberMe=true&__checkbox_rememberMe=true" \ | |
-k https://dev.flurry.com/secure/loginAction.do > login.html | |
curl -v -b ./flurry.jar \ | |
--location-trusted \ | |
http://dev.flurry.com/viewProjects.do > projects.html | |
curl -v -b ./flurry.jar \ |
This file contains 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
@interface NSManagedObject (Serialization) | |
- (NSDictionary*) toDictionary; | |
- (void) populateFromDictionary:(NSDictionary*)dict; | |
+ (NSManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict | |
inContext:(NSManagedObjectContext*)context; | |
@end |
OlderNewer