Skip to content

Instantly share code, notes, and snippets.

View ubermuda's full-sized avatar

Geoffrey Bachelet ubermuda

View GitHub Profile
@ubermuda
ubermuda / gist:3054
Created July 29, 2008 09:40
a styleshit to clean the facebook interface
@-moz-document domain(facebook.com)
{
.myofferpal,
.UICompatibilityFrame_SidebarAds,
.UICompatibilityFrame_FooterAdsContainer,
.UIStandardFrame_SidebarAds,
.profile_sidebar_ads,
.sponsor,
.invitefriends,
.findfriends,
# AtNext plugin
# todo
# implement $next :word [:from]
class AtNextPlugin < Plugin
def initialize()
super
@reminders = Array.new
@trash = Array.new
<?php
/**
* network actions.
*
* @package 1510801
* @subpackage network
* @author Your name here
* @version SVN: $Id: actions.class.php 9301 2008-05-27 01:08:46Z dwhittle $
*/
<?php
$string = 'BOX(534927.21 2184044.55,743600 2471494)';
preg_match_all('/(\d+)(?:\.\d+)?/', $string, $matches);
/*
array(2) {
[0]=>
array(4) {
<?php
class zdComparatorForm extends sfForm
{
public function setup()
{
$this->setWidgets(array(
'product_line' => new sfWidgetFormPropelChoice(array('add_empty' => true, 'model' => 'zdProductLine')),
'model' => new sfWidgetFormChoice(array('choices' => new sfCallable(array($this, 'getModelChoices')))),
));
"-------------------------------------------------------------------------------
" Description: Finds and cd to the symfony root of the project
" Copyright: Copyright (C) 2009 Geoffrey Bachelet
" Maintainer: Geoffrey Bachelet
" Version: 1.0
"-------------------------------------------------------------------------------
if exists('find_symfony_root_loaded')
finish
endif
au BufWritePre *.php call CheckLint()
function! CheckLint()
let l:response = system('/usr/bin/php5 -l '.expand('%'))
if match(l:response, 'No syntax error') == -1
echo l:response
throw 'Parse error !'
end
endfunction
"-------------------------------------------------------------------------------
" Description: Efficient symfony editing with vim
" Copyright: Copyright (C) 2009 Geoffrey Bachelet
" Maintainer: Geoffrey Bachelet
" Version: 1.0
"-------------------------------------------------------------------------------
if exists('symfony_loaded')
" finish
endif
Index: WHATS_NEW
===================================================================
--- WHATS_NEW (revision 17913)
+++ WHATS_NEW (working copy)
@@ -163,3 +163,13 @@
Before `propel:insert-sql` removes all data from a database, it asks for a
confirmation. As this task can remove data from several databases, it now also
displays the name of the connections of the related databases.
+
+Admin Generator
<?php
class myForm extends sfFormDoctrine
{
public function processValues($values = null)
{
$values = parent::processValues($values);
// calculate the value of virtual field "foo"
$values['foo'] = $foo;
return $values;