Skip to content

Instantly share code, notes, and snippets.

View ubermuda's full-sized avatar

Geoffrey Bachelet ubermuda

  • Coconut Software
  • Granby, QC
View GitHub Profile
<?php
public function disableVersionning()
{
foreach($this->getListener() as $key => $listener)
{
if ($listener instanceof Doctrine_AuditLog_Listener)
{
$this->getListener()->remove($key);
}
gallery:
url: /:sf_culture/galleries/:slug
param: { module: gallery, action: gallery }
requirements: { slug: '[\w\d_\-\/]+' }
<?php
/**
* @package SwiftMock
*/
/**
* BaseSwiftFactory
*
* Extend this class if you want to add env-specific instanciation
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Document extends BaseDocument
{
public function getImagePath()
{
return sfConfig::get('sf_upload_dir').'/'.Doctrine_Inflector::urlize($this->name);
#!/bin/bash
# usage: ./svngrep http://svn.example.com/trunk/file foobar
#
# This example will look for the string foobar in all rev of file
#
# @todo better argv handling
# @todo add a --verbose option
# @todo automatic branches and tags detection (?)
<?php
// lol ?
/**
* returns an array of modified fields and associated values
* @return array
* @todo What about a better name? getModifiedFields?
*/
<?php
class apify
{
public
$api_url_template = 'http://www.symfony-project.org/api/1_3/%class_name%#method_%method_name%',
$class_name_callback = null,
$method_name_callback = 'strtolower',
$mask = '!`(sf[a-zA-Z]+)::([a-zA-Z]+)\(\)`!U';
" This function determines, wether we are on the start of the line text (then tab indents) or
" if we want to try autocompletion
func! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
db = window.openDatabase('kolibria', '', 'the kolibria database');
db.transaction(function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS Users(nickname TEXT)');
tx.executeSql('INSERT INTO Users VALUES(?)', ['kik']);
});
<?php
// more showing off
?>