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 | |
ROOTOBJECT=`/usr/libexec/PlistBuddy -c "print rootObject" $1` | |
TARGET=`/usr/libexec/PlistBuddy -c "print objects:$ROOTOBJECT:targets:0" $1` | |
BLDCFGLIST=`/usr/libexec/PlistBuddy -c "print objects:$TARGET:buildConfigurationList" $1` | |
BLDCFGS=`/usr/libexec/PlistBuddy -c "print objects:$BLDCFGLIST:buildConfigurations:0" $1` | |
INFO=`/usr/libexec/PlistBuddy -c "print objects:$BLDCFGS:buildSettings:INFOPLIST_FILE" $1` | |
echo $INFO |
This file has been truncated, but you can view the full 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
aa | |
aah | |
aahed | |
aahing | |
aahs | |
aal | |
aalii | |
aaliis | |
aals | |
aardvark |
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
dispatch_queue_t queue = dispatch_queue_create("My Queue", DISPATCH_QUEUE_SERIAL); | |
__block dispatch_semaphore_t waiter = dispatch_semaphore_create(0); | |
dispatch_async(queue, ^{ | |
NSLog(@"Before Sleep"); | |
sleep(2); | |
NSLog(@"After Sleep"); | |
dispatch_semaphore_signal(waiter); |
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
From: http://snipt.net/yonishin/about-xcode-4-project-template | |
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates | |
Examples: | |
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate |
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
// | |
// UIView+NibLoading.h | |
// | |
// Created by Matt Yohe on 2/11/13. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIView (NibLoading) |
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
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
- (void) methodUsingDeprecatedStuff { | |
//use deprecated stuff | |
} | |
#pragma clang diagnostic pop |
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
Condition types: http://w1.weather.gov/xml/current_obs/weather.php | |
return @{ | |
@"bkn" : @"H", | |
@"skc" : @"B", | |
@"few" : @"N", | |
@"sct" : @"H", | |
@"ovc" : @"L", | |
@"fg" : @"M", | |
@"smoke" : @"N", |
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
// | |
// main.c | |
// CopyList | |
// | |
// Created by Joshua Weinberg on 3/25/13. | |
// Copyright (c) 2013 Joshua Weinberg. All rights reserved. | |
// | |
#include <iostream> | |
#include <map> |
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
-(void)keyboardDidAppearNotification:(NSNotification *)note | |
{ | |
// Grab the height of the keyboard, set an inset | |
NSDictionary* info = [note userInfo]; | |
CGRect kbFrame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; | |
CGRect convertedFromView = [[self scrollView] convertRect:kbFrame fromView:nil]; | |
CGFloat miny = CGRectGetMinY(convertedFromView); | |
CGFloat height = CGRectGetHeight(self.scrollView.frame) - miny + [[self tableView] contentOffset].y; | |
[[self scrollView] setContentInset:UIEdgeInsetsMake(0, 0, height, 0)]; |
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 *dateString = @"Fri, 08 Mar 2013 21:38:49 EST"; | |
NSString *dateTemplate = @"EEE, dd MMM yyyy HH:mm:ss zzz"; | |
NSDateFormatter *incommingFormatter = [[NSDateFormatter alloc] init]; | |
[incommingFormatter setDateFormat:dateTemplate]; | |
NSDate *date = [incommingFormatter dateFromString:dateString]; | |
NSLog(@"%@",date); | |