Skip to content

Instantly share code, notes, and snippets.

View ornicar's full-sized avatar
💭
⏚⏚⏚⏚

Thibault Duplessis ornicar

💭
⏚⏚⏚⏚
View GitHub Profile
class MuscleCollection extends ArrayCollection
{
protected static $possibleValues;
public function __construct(Collection $collection)
{
parent::__construct($collection->toArray());
}
#! /bin/sh
./configure --enable-rubyinterp --enable-gui=gtk2 --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.6/config --with-features=huge --prefix=/home/thib/data/bin/vim
#./configure --enable-rubyinterp --enable-pythoninterp=yes --with-features=huge --prefix=/home/thib/data/bin/vim --with-tlib=ncurses
#./configure --enable-rubyinterp --enable-pythoninterp=yes --with-features=huge --prefix=/home/thib/data/bin/vim
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias sf='php symfony'
alias public='sudo chown -R thib:thib * && sudo chmod -R 777 *'
alias git-archive='git archive'
alias swap='sudo swapoff -a && sudo swapon -a'
alias apt-hop='sudo apt-get update && sudo apt-get upgrade'
alias s='git status'
@ornicar
ornicar / config.yml
Created October 29, 2010 12:40
DoctrineUserBundle YAML config
doctrine_user.config:
db_driver: odm
class:
model:
user: Bundle\ExerciseUserBundle\Document\User
group: ~
permission: ~
form:
user: ~
group: ~
<?php
/**
* @mongodb:Document
*/
class Band
{
/**
* @mongodb:Field(type="string")
* @var string
" Map <CTRL>-a to alignment function
vnoremap <buffer> <C-a> :call PhpAlign()<CR>
" {{{ Alignment
func! PhpAlign() range
let l:paste = &g:paste
let &g:paste = 0
let l:line = a:firstline
@ornicar
ornicar / gist:670839
Created November 10, 2010 13:19
Git + ZendFramework submodule = modified: src/vendor/zend because of CRLF: the workaround
It's a shame, but https://github.com/zendframework/zf2 contains dozens of files with CRLF issues.
If like me, you set your Git core.autocrlf to true, then your ZendFramework submodule is always modified:
$ git status
# On branch master
# Changed but not updated:
#
# modified: src/vendor/zend
To fix it, you can set Git core.autocrlf to false *only for this submodule*.
Parameters:
forum.repository.topic.class
forum.controller.topic.class
forum.form.topic.class
Serices:
forum.repository.topic
forum.controller.topic
<?php
$file = '/path/to/file';
$mimeType = '';
$fileName = 'filename';
//Begin writing headers
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
<?php
namespace Symfony\Component\Security\User;
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE