Skip to content

Instantly share code, notes, and snippets.

View ArnaudD's full-sized avatar

Arnaud Didry ArnaudD

View GitHub Profile
;(function($) {
$.fn.resizable = function () {
var mouseStartY = null;
var startHeight = null;
var resizableObject = $(this);
var columnsCount = $('tr:eq(0) th, tr:eq(0) td', resizableObject).length;
resizableObject.append ('<tfoot><tr><td colspan="'+columnsCount+'" class="resize_bar"></tr></tfoot>');
resizableObject.find ('.resize_bar').mousedown (function (event) {
if(event.preventDefault) // Prevent FF default d'n'drop
@ArnaudD
ArnaudD / uapvSfProject.sh
Created April 8, 2010 20:05
Script pour initialiser un projet symfony sous subversion à l'UAPV
#!/bin/bash
#
# Script pour initialiser un projet symfony sous subversion à l'UAPV
#
# Utilisation :
# wget http://gist.github.com/raw/360467/uapvSfProject.sh -q -O - > /tmp/uapvSfProject.sh
# bash /tmp/uapvSfProject.sh [nom_projet]
#
mkdir $1
/**
* Pour utiliser ce gist, ajouter cette ligne à la fin de votre <body> :
* <script type="text/javascript" src="http://gist.github.com/raw/545787/gistfile1.js"></script>
*/
if (document.location.href.indexOf ('-test.univ-avignon.fr') >= 0) {
var elem = document.createElement ('div');
var url = document.location.href.replace ('-test.univ-avignon.fr', '.univ-avignon.fr');
elem.setAttribute ('style', 'color: red; text-align: center; margin: 5px; font-weight: bold;');
elem.innerHTML =
Index: lib/form/sfFormPropel.class.php
===================================================================
--- lib/form/sfFormPropel.class.php (révision 30918)
+++ lib/form/sfFormPropel.class.php (copie de travail)
@@ -113,22 +113,70 @@
*/
public function bind(array $taintedValues = null, array $taintedFiles = null)
{
- $this->addOptionalForms($taintedValues);
+ $this->addOptionalFormsRecusively($taintedValues);
Index: lib/widget/sfWidgetFormSchemaOptional.class.php
===================================================================
--- lib/widget/sfWidgetFormSchemaOptional.class.php (revision 30918)
+++ lib/widget/sfWidgetFormSchemaOptional.class.php (working copy)
@@ -36,7 +36,8 @@
protected function getDecorator($name)
{
- $strippedName = substr($name, strrpos($name, '[') + 1, strrpos($name, ']') - strrpos($name, '[') - 1);
+ $widgetName = substr($name, strrpos($name, '[') + 1, strrpos($name, ']') - strrpos($name, '[') - 1);
@ArnaudD
ArnaudD / template.html
Created January 6, 2011 09:56
HTML 5 Boilerplate
<!doctype html>
<!--[if lt IE 7 ]><html lang="en" class="no-js ie6"><![endif]-->
<!--[if (gt IE 6)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
#!/bin/bash
LOGIN=`zenity --entry --text "Quel est votre identifiant uapv"`
zenity --info --text "Merci $LOGIN, ton compte est maintenant monté"
#!/bin/bash
#
# Script utilisé pour ajouter des exceptions mod_security aux vhost en test
DEBUG=1
VHOST_BASEDIR='/nfsconfig/apache2/sites-available/'
function usage
{
echo
#!/usr/bin/python
from BeautifulSoup import BeautifulSoup
import feedparser, glob, codecs, csv, sys
from xml.dom.minidom import parse, parseString
i = 8888
for htmlFile in glob.glob('*.html'):
#print htmlFile
@ArnaudD
ArnaudD / gist:976173
Created May 17, 2011 09:00
Filez compatibility with postgresql
diff --git a/app/controllers/Install.php b/app/controllers/Install.php
index d8b5d72..bd88484 100644
--- a/app/controllers/Install.php
+++ b/app/controllers/Install.php
@@ -323,7 +323,7 @@ class App_Controller_Install extends Fz_Controller {
$version = '2.0.0';
} else if ($table['table_name'] == 'fz_info') {
$res = Fz_Db::findAssocBySQL(
- 'SELECT `value` FROM `fz_info` WHERE `key`=\'db_version\'');
+ 'SELECT value FROM fz_info WHERE key=\'db_version\'');