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 MobileCoreServices; | |
static CFStringRef UTTypeForImageData(NSData *data) { | |
const unsigned char * bytes = [data bytes]; | |
if (data.length >= 8) { | |
if (bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E && bytes[3] == 0x47 && bytes[4] == 0x0D && bytes[5] == 0x0A && bytes[6] == 0x1A && bytes[7] == 0x0A) { | |
return kUTTypePNG; | |
} | |
} |
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
// | |
// STSCoverImageViewController.m | |
// Stasis | |
// | |
// Created by Cory D. Wiles on 6/5/14. | |
// Copyright (c) 2014 Macspots. All rights reserved. | |
// | |
#import "STSCoverImageViewController.h" | |
#import "Profile.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
// | |
// MSImageCache.swift | |
// Stasis | |
// | |
// Created by Cory D. Wiles on 8/17/14. | |
// Copyright (c) 2014 Macspots. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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
// | |
// UIViewExtensions.swift | |
// Singles | |
// | |
// Created by Cory D. Wiles on 2/19/15. | |
// Copyright (c) 2015 Cory WIles. All rights reserved. | |
// | |
import UIKit |
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 UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
lazy var navigationController: UINavigationController = { | |
let navController = UINavigationController(rootViewController: self.rootViewController) |
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)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { | |
RTVLog(@"decidePolicyForNavigationAction %@", navigationAction); | |
if (navigationAction.navigationType == WKNavigationTypeOther) { | |
NSURL *url = navigationAction.request.URL; | |
UIApplication *app = [UIApplication sharedApplication]; | |
if ([[url scheme] isEqualToString:RabbleURLScheme]) { |
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)sayHello { | |
NSLog(@"hello"); | |
} |
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)webViewDidFinishLoad:(UIWebView *)webView { | |
/** | |
* Since there are a lot redirects then UIWebview delegate methods are called ALOT. | |
* Therefore I just want to check and make sure that I am only getting the value when the url has my hostname in it | |
*/ | |
NSRange rangeRound = [[[webView.request URL] absoluteString] rangeOfString:@"corywiles"]; | |
if (rangeRound.length) { |
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
<?php | |
//Example Code | |
private function _notifyGroup() { | |
$data = array(); | |
$data = $this->getForm()->getValues(); | |
/** | |
* Setup view instance to pass to notifier | |
*/ |
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
<?php | |
require_once 'Zend/Service/Twitter.php'; | |
class CW_Twitter extends Zend_Service_Twitter { | |
public function __construct($username, $password) { | |
parent::__construct($username, $password); | |
} | |
public function getOtherUserFriends($name) { |
OlderNewer