👨👩👦
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
extension Observable { | |
func asHistoricalObservable() -> Observable<(previous: Element, next: Element)> { | |
return makeHistoricalObservable(observable: self) | |
} | |
} | |
extension Variable { | |
func asHistoricalObservable() -> Observable<(previous: Element, next: Element)> { | |
return makeHistoricalObservable(observable: self.asObservable()) | |
} |
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
// I dont want my table jumping/animation when appending new rows | |
// for an infinite scroll feel | |
// | |
// Some of this might not be needed but it works | |
// | |
// TODO: Possibly garbage | |
extension UITableView { | |
func reloadDataSmoothly() { | |
UIView.setAnimationsEnabled(false) |
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
// Differences from defaults | |
// 1. Tab instead of backspace on left hand | |
// 2. Control was taken off of Z | |
// 3. LGui (CMD/Windows) on bottom left left hand | |
// 4. AlfShf replaced with Alt on left hand (for hots) | |
#include "ergodox_ez.h" | |
#include "debug.h" | |
#include "action_layer.h" |
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
class ViewController : UIViewController { | |
let viewModel = ViewModel() | |
private let disposeBag = DisposeBag() | |
override func viewDidLoad(){ | |
super.viewDidLoad() | |
self.viewModel.navigationVariable.asObservable() | |
.subscribeNext { data in |
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
extension Optional where Wrapped: StringLiteralConvertible { | |
var isEmpty: Bool { | |
return true | |
} | |
} |
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
// Imports comment JSON into RestKit | |
let json: RestKitJSON = ["some_key": "some_value"] // [NSObject: AnyObject] | |
importObject(json, finished: { (model: YourModel?) -> () in | |
print("YourModel - \(model)") | |
}) |
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
SLACK_TOKEN=blahblahblah |
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
machine: | |
xcode: | |
version: "7.0" | |
dependencies: | |
pre: | |
- brew uninstall xctool && brew install --HEAD xctool |
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
var json : Dictionary<String, AnyObject> = ["first_name" : "Josh", "last_name" : "Holtz", | |
"best_friend" : ["first_name" : "Bandit", "last_name" : "The Cat"], | |
"friends" : [ ["first_name" : "Red Ranger"], ["first_name" : "Green Ranger"] ], | |
"birthday" : "1989-03-01" | |
] | |
var jsons = [json] | |
/* | |
* OLD WAY (before protocol extensions) | |
*/ |
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
app.config(['$compileProvider', | |
function ($compileProvider) { | |
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|local|data):/); | |
}]); |