Skip to content

Instantly share code, notes, and snippets.

View codecowboy's full-sized avatar

Luke Mackenzie codecowboy

  • UK
View GitHub Profile
`deepthoughtPro:netpbm-10.35.78 lukemackenzie$ brew rm jpeg
Uninstalling /usr/local/Cellar/jpeg/8b...
deepthoughtPro:netpbm-10.35.78 lukemackenzie$ brew install jpeg
==> Downloading http://www.ijg.org/files/jpegsrc.v8b.tar.gz
File already downloaded and cached to /Users/lukemackenzie/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/jpeg/8b --disable-dependency-tracking
==> make install
/usr/local/Cellar/jpeg/8b: 17 files, 1.6M, built in 28 seconds
deepthoughtPro:netpbm-10.35.78 lukemackenzie$ brew install netpbm
@codecowboy
codecowboy / gist:1048738
Created June 27, 2011 11:59
Twig error
A template that extends another one cannot have a body (Twig_Node_Print(
expr: Twig_Node_Expression_Filter(
node: Twig_Node_Expression_Constant(value: 'registration.check_email')
filter: Twig_Node_Expression_Constant(value: 'trans')
arguments: Twig_Node(
0: Twig_Node_Expression_Array(
%email%: Twig_Node_Expression_GetAttr(type: 'any'
node: Twig_Node_Expression_Name(name: 'user')
attribute: Twig_Node_Expression_Constant(value: 'email')
arguments: Twig_Node()
@codecowboy
codecowboy / gist:1056834
Created June 30, 2011 18:18
Programme Entity
<?php
namespace Gymloop\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="programmes")
*/
class Programme
{
@codecowboy
codecowboy / gist:1056837
Created June 30, 2011 18:19
User Entity Class
<?php
namespace Gymloop\CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
@codecowboy
codecowboy / gist:1078862
Created July 12, 2011 20:10
config.yml
parameters:
date_format: m/D/y
services:
gymloop_profile_type:
class: Gymloop\CoreBundle\Form\ProfileFormType
tags:
- { name: form.type, alias: gymloop.profile.type }
arguments: [%fos_user.model.user.class%]
@codecowboy
codecowboy / gist:1078865
Created July 12, 2011 20:11
ProfileFormType
<?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@codecowboy
codecowboy / gist:1078869
Created July 12, 2011 20:12
ProfileFormHandler
<?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@codecowboy
codecowboy / gist:1078873
Created July 12, 2011 20:13
User Entity Class
<?php
namespace Gymloop\CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
@codecowboy
codecowboy / gist:1078906
Created July 12, 2011 20:31
Updated PorfileFormHandler
<?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@codecowboy
codecowboy / gist:1078933
Created July 12, 2011 20:40
edit template
{# this can be used to get an individual form value {{form.username.get('value') } #}
{#classes like input_large are from the formalize framework - see formalize.css#}
<form class="grid_6 prefix_1" action="{{ path('fos_user_profile_edit') }}" {{ form_enctype(form) }} method="POST" class="fos_user_profile_edit">
{{ form_errors(form) }}
<div class="grid_2 alpha">
{{ form_label(form.first_name, 'First Name: ') }}
</div>