Skip to content

Instantly share code, notes, and snippets.

View kwylez's full-sized avatar

Cory D. Wiles kwylez

View GitHub Profile
- (void)sayHello {
NSLog(@"hello");
}
<?php
$token = '';
if ($_GET['code'] !== '') {
$token = file_get_contents('https://graph.facebook.com/oauth/access_token?client_id=xxxxxxxxxxxxxxxx&redirect_uri=http://youdomain.com/callbackurl/&client_secret=xxxxxxxxxxxxxx&code='.$_GET['code']);
} else {
print "no code";
}
?>
<html>
- (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) {
- (void)loadView {
UIView *mainView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
self.view = mainView;
[mainView release];
UITableView *tblView = [[UITableView alloc] initWithFrame:CGRectMake(0 55, 320, 300)&nbsp;style:UITableViewStylePlain];
#header {
background: #FBFBF9;
background: -webkit-gradient(linear, left 45%, left 90%, from(rgba(253, 251, 252, 1.0)), to(rgba(207, 204, 199, 1.0)));
/* for FF 3.6 */
background: -moz-linear-gradient(rgba(253, 251, 252, 1.0) 45%, rgba(207, 204, 199, 1.0) 90%);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#FDFBFC, endColorstr=#CFCCC7);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#FDFBFC, endColorstr=#CFCCC7)";
text-align: right; padding: 5px 0; }
<?php
//Example Code
private function _notifyGroup() {
$data = array();
$data = $this->getForm()->getValues();
/**
* Setup view instance to pass to notifier
*/
<?php
/**
* @see Zend_Validate_Abstract
*/
require_once 'Zend/Validate/Abstract.php';
/**
* @see Zend_Http_Client
*/
require_once 'Zend/Http/Client.php';
<?php
// En.php
return array(
'name' => 'First Name',
'address' => 'Address'
);
// Es.php
<?php
<route>^(?!\bsearch|forms\b)(\w+-?[\w-?]*\/?)(.*)?</route>
?>
// Parent UIViewControlller
- (void)viewWillAppear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(refreshSearchBarControllerWithDepartmentCode:)
name:@"DepartmentCodeNotification"
object:nil];