Skip to content

Instantly share code, notes, and snippets.

View kwylez's full-sized avatar

Cory D. Wiles kwylez

View GitHub Profile
<?php
// En.php
return array(
'name' => 'First Name',
'address' => 'Address'
);
// Es.php
// Parent UIViewControlller
- (void)viewWillAppear:(BOOL)animated {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(refreshSearchBarControllerWithDepartmentCode:)
name:@"DepartmentCodeNotification"
object:nil];
<?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)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
/**
* @see Zend_Validate_Abstract
*/
require_once 'Zend/Validate/Abstract.php';
/**
* @see Zend_Http_Client
*/
require_once 'Zend/Http/Client.php';
<?php
<route>^(?!\bsearch|forms\b)(\w+-?[\w-?]*\/?)(.*)?</route>
?>
@kwylez
kwylez / gist:647794
Created October 26, 2010 21:01
Force backbaritem to show
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.navigationItem.title = @"Back";
[self.navigationItem setHidesBackButton:YES animated:NO];
[self.navigationController.navigationBar setNeedsDisplay];
}
//
// CWCustomAccessoryView.h
// CustomAccessory
//
// Created by Cory Wiles on 10/8/10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
- (void)fixupAdView:(UIInterfaceOrientation)toInterfaceOrientation {
if (adBannerView != nil) {
[super configureIAdContentSizes];
[UIView beginAnimations:@"fixupViews" context:nil];
CGFloat toolbarHeight = self.toolbar.frame.size.height;