Skip to content

Instantly share code, notes, and snippets.

View cordoval's full-sized avatar

Luis Cordova cordoval

View GitHub Profile

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
@cordoval
cordoval / .gitignore
Last active August 29, 2015 14:02
Starting with components
/vendor
use Symfony\CS\FixerInterface;
use Symfony\CS\Tokens;
class ShortArraySyntaxFixer implements FixerInterface
{
public function fix(\SplFileInfo $file, $content)
{
$tokens = Tokens::fromCode($content);
for ($index = 0, $c = $tokens->count(); $index < $c; $index++) {
class FormFieldManager
{
/**
* Recria fields com rebra de bloqueio.
*
* @param FormInterface $sourceForm
* @param FormInterface $child
*/
public function rebuildChild(FormInterface $sourceForm, FormInterface $child)
{
<?php
/**
* sfValidatorZip validates a zip code.
*
* @author Brent Shaffer <bshafs@gmail.com>
*/
class sfValidatorZip extends sfValidatorRegex
{
@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
<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