Skip to content

Instantly share code, notes, and snippets.

Avatar

Cory D. Wiles kwylez

View GitHub Profile
View gist:594264
- (void)sayHello {
NSLog(@"hello");
}
View gist:595372
<?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>
View gist:595379
- (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) {
View gist:595390
- (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];
View gist:595392
#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; }
View gist:595396
<?php
//Example Code
private function _notifyGroup() {
$data = array();
$data = $this->getForm()->getValues();
/**
* Setup view instance to pass to notifier
*/
View gist:595412
<?php
/**
* @see Zend_Validate_Abstract
*/
require_once 'Zend/Validate/Abstract.php';
/**
* @see Zend_Http_Client
*/
require_once 'Zend/Http/Client.php';
View gist:595419
<?php
// En.php
return array(
'name' => 'First Name',
'address' => 'Address'
);
// Es.php
View gist:595427
<?php
<route>^(?!\bsearch|forms\b)(\w+-?[\w-?]*\/?)(.*)?</route>
?>
View gist:595439
// Parent UIViewControlller
- (void)viewWillAppear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(refreshSearchBarControllerWithDepartmentCode:)
name:@"DepartmentCodeNotification"
object:nil];