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 | |
for f in $(ls *.c) | |
do | |
echo $f | |
dir=$(echo $f | sed -e 's/.c//g') | |
mv $f $dir/main.c | |
done |
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
// cc -fobjc-arc -framework Foundation main.m | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSLog(@"hello, world"); | |
} | |
return 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
extension NSUserDefaults { | |
func colorForKey(key: String) -> UIColor? { | |
var color: UIColor? | |
if let colorData = dataForKey(key) { | |
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor | |
} | |
return color | |
} |
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
import Foundation | |
import Alamofire // Alamofire/Alamofire | |
import Blocker // aclissold/Blocker | |
Alamofire.request(.GET, "http://httpbin.org/get").responseJSON { | |
(_, _, JSON, _) in | |
if let JSON = JSON as? [String: AnyObject] { | |
println(JSON) | |
} |
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
# Copyright (c) 2012 The Go Authors. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above | |
# copyright notice, this list of conditions and the following disclaimer |
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 OneClass {} | |
class AnotherClass {} | |
let one = OneClass() | |
let another = AnotherClass() | |
let crash = one as AnyObject as AnotherClass |
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
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ |
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
diff --git a/The Oakland Post/PostTableViewController.swift b/The Oakland Post/PostTableViewController.swift | |
index a2666ed..7f5c336 100644 | |
--- a/The Oakland Post/PostTableViewController.swift | |
+++ b/The Oakland Post/PostTableViewController.swift | |
@@ -17,7 +17,7 @@ class PostTableViewController: BugFixTableViewController, MWFeedParserDelegate, | |
} | |
var baseURL: String! | |
- var feedParser: FeedParser! | |
+ var feedParser: MWFeedParser! |
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
// MARK: NHBalancedFlowLayoutDelegate | |
func collectionView(collectionView: UICollectionView!, | |
layout collectionViewLayout: NHBalancedFlowLayout!, | |
preferredSizeForItemAtIndexPath indexPath: NSIndexPath!) -> CGSize { | |
if UIScreen.mainScreen().scale == 1.0 { | |
var size = photos[indexPath.item].size | |
size.width /= 2 | |
size.height /= 2 | |
return size |
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
let fruits = ["apple", "bananananana"] | |
/* | |
var s: String | |
if fruits.count == 1 { | |
s = "" | |
} else { | |
s = "s" | |
} |
NewerOlder