Skip to content

Instantly share code, notes, and snippets.

View brandoncordell's full-sized avatar

Brandon Cordell brandoncordell

View GitHub Profile
## Cucumber Scenario
@wip
Scenario: Login with correct details
Given a user named "brent" exists
When I go to login
And I fill in "Username" with "brent"
And I fill in "Password" with "screech"
And I press "Log In"
# And show me the page
MacBook-Pro:weblog brandon$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.0)
Using builder (2.1.2)
Using i18n (0.4.1)
Using activemodel (3.0.0)
Using erubis (2.6.6)
Using rack (1.2.1)
@brandoncordell
brandoncordell / gist:799922
Created January 28, 2011 06:43
CakePHP Link Helper
<?php
/**
* Link Helper
*
* @copyright Copyright 2010, Brandon Cordell
* @author Brandon Cordell <brandon@leadandrock.com>
* @link http://snippets.leadandrock.com/cakephp-link-helper
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*
* Usage:
@brandoncordell
brandoncordell / gist:799923
Created January 28, 2011 06:44
Authorize.net ARB library
<?php
/**
* Library for using Authorize.net's ARB (automated recurring billing)
*
* @author Brandon Cordell(brandon@leadandrock.com)
* @link http://projects.leadAndrock.com/cake_arb
* @copyright Copyright (c) 2010, Brandon Cordell
* @version 1.0
*
@brandoncordell
brandoncordell / gist:799932
Created January 28, 2011 06:53
CreateMyScene.com/shop - products.js
<script type="text/javascript">
//<![CDATA[
var image_url = '<?=base_url()?>public/shared/images/products/';
$(document).ready(function()
{
/* hide some divs */
$('.wall, .window, .multiple_windows, .cart').hide();
/* disable checkout buttons */
@brandoncordell
brandoncordell / gist:799934
Created January 28, 2011 06:54
dZero Auth - CodeIgniter library
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero authentication library
*
* @package dZero Auth Library
* @category authentication
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
@brandoncordell
brandoncordell / gist:799936
Created January 28, 2011 06:55
dZero Image Lib - CodeIgniter Library
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* dZero image library
*
* @package dZero Image Library
* @category Image Manipulation
* @author Daniel Nolan (daniel.nolan@dZerodesign.com) & Brandon Cordell (brandon.cordell@dZerodesign.com)
* @copyright Copyright (c) 2009 dZero Web Design & Development.
* @link http://dzerodesign.com
* @version 1.0
ALTER TABLE `table_name` AUTO_INCREMENT = xxxxx;
http://maps.google.com/maps/api/staticmap?center=2312+gulf+to+bay+blvd+clearwater+fl&zoom=17&size=400x400&sensor=false
@brandoncordell
brandoncordell / cakephp component extension
Created June 17, 2011 13:28
Extending components in CakePHP without having to change all the calls to the original component
// controllers/components/custom_acl.php
App::import('Component', 'Acl');
class CustomAclComponent extends AclComponent {
public function example() {
// override the function
}
}
Then in your app_controller