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
func traverse(keyPath: [String], dict: Dictionary<String, AnyObject>?) -> AnyObject? { | |
if dict == nil { | |
return nil | |
} | |
var paths = keyPath | |
let next = paths.first! | |
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
char str[100]; | |
fgets (str, 100, stdin); | |
NSString *inputString = [[NSString alloc] initWithUTF8String:str]; | |
inputString = [inputString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; | |
NSLog(@"Input was %@", inputString); |
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
row1 = 0,0 1,0 2,0 3,0 | |
row2 = 0,1 1,1 2,1 3,1 | |
row3 = 0,2 1,2 2,2 3,2 |
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
// | |
// AmazonProduct.swift | |
// Requires SHXMLParser for parsing Amazon's XML responses (https://github.com/simhanature/SHXMLParser) | |
// | |
// Created by Cory Alder on 2015-01-11. | |
// Copyright (c) 2015 Davander Mobile Corporation. All rights reserved. | |
// | |
// partly inspired by RWMAmazonProductAdvertisingManager | |
import Alamofire |
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
// Playground - noun: a place where people can play | |
import UIKit | |
class MyItem { /* some model properties */ } | |
protocol ItemViewProtocol: class { | |
// some protocol methods (e.g. updateWithItem(), etc) | |
func setupItem(item: MyItem) | |
init(String) |
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
### Keybase proof | |
I hereby claim: | |
* I am coryalder on github. | |
* I am ca (https://keybase.io/ca) on keybase. | |
* I have a public key whose fingerprint is ADB2 34A2 549E BC4B 4EB5 0276 819C 75BF 9A12 6635 | |
To claim this, I am signing this object: |
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
function wopen { # via https://gist.github.com/coryalder/5609996 | |
WORKSPACE="${PWD##*/}.xcworkspace" | |
PROJECT="${PWD##*/}.xcodeproj" | |
if [ -a $WORKSPACE ]; then | |
open $WORKSPACE; | |
elif [ -a $PROJECT ]; then | |
open $PROJECT; | |
else | |
echo "No workspace or project found."; | |
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
<table> | |
<tr><td>hi</td><td>hello</td></tr> | |
<tr><td>howdy</td><td>hi hi</td></tr> | |
<tr><td>bye</td><td>goodbye</td></tr> | |
</table> |
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
Appirater | |
AQGridView | |
AutoHyperlinks | |
Boost | |
Chromium | |
CocoaLumberjack | |
CoreTextHyperlinkView | |
EGODatabase | |
EGOTableViewPullRefresh | |
HPGrowingTextView |
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 | |
cd ~/textmate | |
git pull origin | |
git submodule update | |
ninja TextMate | |
: ${NEWTEXTMATEPATH:="$HOME/build/TextMate/Applications/TextMate/TextMate.app"} | |
if [ -d $NEWTEXTMATEPATH ]; then | |
rm -rf /Applications/TextMate.app | |
mv $NEWTEXTMATEPATH /Applications/ | |
fi |