Skip to content

Instantly share code, notes, and snippets.

View fullybaked's full-sized avatar

David Baker fullybaked

View GitHub Profile
@fullybaked
fullybaked / UploadComponent.php
Created March 6, 2012 14:18
Upload Component for CakePHP 2.0
<?php
/**
* Component handles various types of file upload
*
* @author Dave Baker
* @copyright Dave Baker / Fully Baked 2012
* @link www.fullybaked.co.uk
*/
class UploadComponent extends Component {
@fullybaked
fullybaked / HtmlHelper.php
Created January 14, 2012 12:25
Enhanced HtmlHelper::getCrumbs() from CakePHP 2.x to allow custom first link url and passing of images
<?
/**
* Returns the breadcrumb trail as a sequence of &raquo;-separated links.
*
* @param string $separator Text to separate crumbs.
* @param string $startText This will be the first crumb, if false it defaults to first crumb in array
* @param mixed $startPath Url for the first link in the bread crumbs, can be a string or array
* @param boolean $escape Escape the content of the link text, set to false if passing an image in
* @return string Composed bread crumbs
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper
@fullybaked
fullybaked / test.scss
Created January 9, 2012 14:43
Test file for SCSS parsing based on 4 examples on http://sass-lang.com
/* Test SCSS File */
/* Variables & Calculations */
$blue: #3bbfce;
$margin: 16px;
.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);