Skip to content

Instantly share code, notes, and snippets.

View cordoval's full-sized avatar

Luis Cordova cordoval

View GitHub Profile
@cordoval
cordoval / gist:643063
Created October 24, 2010 03:56
getWithJobs
// lib/model/doctrine/JobeetCategoryTable.class.php
class JobeetCategoryTable extends Doctrine_Table
{
public function getWithJobs()
{
$q = $this->createQuery('c')
->leftJoin('c.JobeetJobs j')
->where('j.expires_at > ?', date('Y-m-d H:i:s', time()));
return $q->execute();
@cordoval
cordoval / gist:653015
Created October 29, 2010 06:18
suphp.conf
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
@cordoval
cordoval / gist:653020
Created October 29, 2010 06:21
vhost
<VirtualHost *:80>
ServerName ward.local
DocumentRoot /home/cordoval/Dropbox/ward
DirectoryIndex index.php
<Directory /home/cordoval/Dropbox/ward/>
AllowOverride All
allow from all
</Directory>
</VirtualHost>
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<VirtualHost *:80>
ServerName ward.local
DocumentRoot /home/cordoval/Dropbox/ward
suPHP_Engine on
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
DirectoryIndex index.php
<Directory /home/cordoval/Dropbox/ward/>
AllowOverride All
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<VirtualHost *:80>
ServerName ward.local
DocumentRoot /home/cordoval/Dropbox/ward
DirectoryIndex index.php
<Directory /home/cordoval/Dropbox/ward/>
AllowOverride All
allow from all
</Directory>
</VirtualHost>
rep:
pattern: /rep
defaults: { _controller: AwareSales:Rep:index }
sale_main:
pattern: /sale/
defaults: { _controller: AwareSales:Sale:index }
sale_new:
pattern: /sale/new
in my controller:
--------------------
$form = SalesForm::create($this->get('form.context'), 'sale', array('em' => $em));
in my SalesForm:
--------------------
class SalesForm extends Form
{