Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
Make sure Product->Scheme->Edit Scheme->Run is using "Debug" mode | |
(lldb) p NSPointFromString(@"{10.0, 20.0}"); | |
error: 'NSPointFromString' has unknown return type; cast the call to its declared return type | |
error: 1 errors parsing expression | |
(lldb) p (NSPoint)NSPointFromString(@"{10.0, 20.0}”); | |
(NSPoint) $0 = (x = 10, y = 20) | |
(lldb) e @import UIKit | |
(lldb) po self.view.bounds |
// | |
// Signal+Extensions.swift | |
// Khan Academy | |
// | |
// Created by Nacho Soto on 10/1/15. | |
// Copyright © 2015 Khan Academy. All rights reserved. | |
// | |
import ReactiveCocoa |
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1 | |
// Author: Timo Wälisch <timo@waelisch.de> | |
import UIKit | |
import RealmSwift | |
import ObjectMapper | |
import SwiftyJSON | |
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType { | |
typealias Object = List<T> |
/** | |
* Adapted from https://github.com/indragiek/AlamofireRACExtensions | |
*/ | |
public func get<T>(url: String, f: (AnyObject -> Result<T, NSError>)) -> SignalProducer<T, NSError> { | |
return SignalProducer { sink, disposable in | |
let request = Alamofire.request(.GET, hostname + url) | |
.responseJSON { (request, response, responseObject, error) in | |
if let error = error { | |
sendError(sink, error) | |
} else if let response = response { |
/* DeviceUID.h | |
#import <Foundation/Foundation.h> | |
@interface DeviceUID : NSObject | |
+ (NSString *)uid; | |
@end | |
*/ | |
// Device.m |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
#!/bin/sh | |
# This script automatically sets the version and short version string of an | |
# Xcode project from the Git repository containing the project. | |
# | |
# To use this script in Xcode 4, add the contents to a "Run Script" build | |
# phase for your application target. | |
set -o errexit | |
set -o nounset |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
# by Andreas Monitzer (@anlumo1) and Pepi Zawodsky (@MacLemon) | |
# | |
# This script published under WTF license | |
# http://en.wikipedia.org/wiki/WTFPL | |
# Improvements to this script are welcome though. | |
# Augments the Info.plist with a lot of nice stuff. | |
# It's suggested to call this script from a "run script" build phase, not copy the script's contents there. |