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
/** | |
* @discussion takes the passed image parameter and displays a view controller modally that shwos the image | |
* You can call it from the debugger like this: | |
* expr JSDebugDisplayImage(image) | |
* @note you can dismiss the view controller simply by tapping on it | |
*/ | |
extern void JSDebugDisplayImage(UIImage *image); |
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
// The weak pointer is read, and retained until the message send completes its synchronous work. | |
[weakValue doAThing]; |
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
// | |
// NBResponderChainUtilities.h | |
// | |
// Created by Nicolas @ bou.io on 19/04/13. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIView (NBResponderChainUtilities) | |
- (UIView*) nb_firstResponder; // Recurse into subviews to find one that responds YES to -isFirstResponder |
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
Pod::Spec.new do |s| | |
s.name = "ReactiveCocoa" | |
s.version = "1.x-head" | |
s.summary = "A framework for composing and transforming sequences of values." | |
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source" | |
s.author = { "Josh Abernathy" => "[email protected]" } | |
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git" } | |
s.license = 'Simplified BSD License' | |
s.description = "ReactiveCocoa offers:\n" \ | |
"1. The ability to compose operations on future data.\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
#include "pebble_os.h" | |
#include "pebble_app.h" | |
#include "pebble_fonts.h" | |
#define MY_UUID { 0x57, 0xFF, 0x75, 0x31, 0x72, 0x97, 0x46, 0x0A, 0x86, 0x02, 0x6F, 0x6F, 0x79, 0xEA, 0x4E, 0xE4 } | |
PBL_APP_INFO(MY_UUID, | |
"Watchface", "Javier Soto", | |
1, 0, /* App version */ | |
DEFAULT_MENU_ICON, |
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
// Image is from http://dopiaza.org/tools/datauri/examples/index.php | |
#import "DIAppDelegate.h" | |
@implementation DIAppDelegate | |
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.backgroundColor = [UIColor whiteColor]; |
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 | |
# Requires ImageMagick: `brew install imagemagick` | |
# Requires version.sh from https://gist.github.com/osteslag/1089407 | |
# | |
# Set RGM_STAMP_VERSION_ON_ICONS=1 in your build settings to enable/disable | |
# stamping on Debug/Relase configurations. | |
# | |
# Make base unstamped versions Icon.base.png, &c. in the source tree. The | |
# script will make stamped versions Icon.png, &c. It relies on Xcode to copy |
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 *sanitizedString = [URLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | |
NSURL *URL = [NSURL URLWithString:sanitizedString]; |
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 python | |
import requests | |
import json | |
import StringIO | |
import datetime | |
hockeyToken = 'getyourowndamnkey' | |
appsEndpoint = 'https://rink.hockeyapp.net/api/2/apps' | |
crashesEndpoint = 'https://rink.hockeyapp.net/api/2/apps/%s/crashes/histogram?api_token=%s&format=json&start_date=%s&end_date=%s' |
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) pushViewController:(UIViewController *)viewController animated:(BOOL)animated { | |
newViewController.view.frame = //original frame | |
[self addChildViewController:newViewController]; | |
[self transitionFromViewController:oldViewController | |
toViewController:newViewController | |
duration:(animated?0.35f:0) | |
options:0 | |
animations:^{ |