Face à cette erreur, vérifiez que vos répertoires sont bien avec les droits 705.
Pour changer tous les répertoires (et sous répertoires) d’un coup :
find ./www -type d | xargs chmod 705
Face à cette erreur, vérifiez que vos répertoires sont bien avec les droits 705.
Pour changer tous les répertoires (et sous répertoires) d’un coup :
find ./www -type d | xargs chmod 705
Twitter should be ashamed, I cannot find any RSS icon on a profile page. WTF !? Web 2.0 is only one way for Twitter ?
Thanks to this page, you can get a bookmarklet which will bring you RSS feed :
Add your behavior in a new file in :
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/behavior/SfPropelBehaviorMyBehavior.php
Edit SfPropelBehaviorSymfony.php and add a loader for your new Behavior. Example :
public function modifyDatabase()
{
foreach ($this->getDatabase()->getTables() as $table)
{
$behaviors = $table->getBehaviors();[…………]
// MyBehavior
if (!isset($behaviors[‘symfony_mybehavior’]))
{$class = Propel::importClass($this->getBuildProperty(‘propel.behavior.symfony_mybehavior.class’));
$behavior = new $class();
$behavior->setName(‘symfony_mybehavior’);
$behavior->setParameters($parameters);
$table->addBehavior($behavior);}
Edit config/propel.ini and add a new line with your new behavior
Rebuild your full models and enjoy !
Un excellent article de Bioaddict qui détaille le fonctionnement de la certification bio par Ecocert, organisme de certification bio.
Tous les produits bio d’origine française ou importés, qu’il soient issus de l’agriculture, de l’élevage, ou des industries de transformation, doivent répondre à des cahiers des charges précis et très contraignants.
…
il réalise 65% des contrôles et des certifications mondiales concernant l’agriculture bio et les produits cosmétiques. Il est armé pour ce faire de 493 personnes dont 110 auditeurs qui sillonnent tous les jours le terrain. Il réalise plus de 28 000 contrôles par an, contrôle et certifie près de 20 000 agriculteurs bio et près de 1000 fabricants de produits cosmétiques
…
En France, 1,5 visites sont effectuées en moyenne par an pour un producteur, 2 pour un transformateur ou une entreprise. L’auditeur fait un relevé précis des données sur les points de contrôles à effectuer. Ensuite ce relevé est analysé par un autre auditeur afin d’éviter les éventuelles complaisances.
2 very usefull programs to :
apt-get install gcolor2 agave
Quelle est la probabilité durant une année quelconque qu’il y ait un accident nucléaire majeur, connaissant la probabilité d’accident majeur par réacteur et le nombre de réacteurs en service ?
Comme je n’ai plus fait de combinatoire depuis longtemps, je demandais aux commentateurs de me corriger si nécessaire. eneite (2) m’assure que ma formule est correcte, je la reproduis donc ici.
R(n) = 1 – (1-p)^n
Disons que le risque pour un réacteur est d’un accident majeur tous les cinq mille ans. S’il n’y a qu’un réacteur au monde, le risque d’un accident majeur pour une année x est de 0,2 %o. Si j’ai 443 réacteurs en service dans le monde – ce qui est apparemment le cas aujourd’hui – quel est le risque d’un accident majeur sur une année, et par exemple, sur l’année en cours ?
R(443) = 1 – (0,9998)^443 = 8,48 %
On voit donc que même avec une probabilité d’accident qui paraît extrêmement faible : un accident seulement tous les 5 000 ans pour un réacteur, on débouche pourtant sur une probabilité de 8,48 % d’accidents majeurs par an si l’on a 443 réacteurs en service, c’est-à-dire un niveau très loin d’être négligeable.
If you encounter an issue with onkeydown event on filter fields, there is a bug in sfDataGridPlugin.
Edit sfDAtaGridFormatterPropel.class.php and add the missing “&” in url building :
$url = $object->_get(‘moduleAction’) . ‘?’ . $this->P_PAGE . ‘=1&‘ . $suffix . ‘&’ . $this->P_SORT . ‘=’ . $object->_get(‘sortBy’) . ‘&’ . $this->P_ORDER . ‘=’ . $object->_get(‘sortOrder’);
To chmod or apply any command to subdirectories, use :
find ./ -type d | xargs chmod 755
This is a little cookquide to setup a ssh tunnel through a proxy web. Your DNS queries will also be tunneled.
First step, you need a ssh server on a remote server.
Configure it to listen to port 443 :
file : /etc/ssh/sshd_config
Port 22
Port 443
Then you need to install corkscrew (on your local machine) :
sudo apt-get install corkscrew
Then create (or edit) your local ssh config file (~/.ssh/config) :
Host ssh-proxy
HostName your-remote-ssh-server
# Local SSH Server port
Port 443
# Keep-Alive
KeepAlive yes
ProtocolKeepAlives 60
# Use proxy with login/passwd
# ProxyCommand /usr/bin/corkscrew address-of-proxy 3128 %h %p /home/user/.ssh/proxy_auth
# Use proxy without authentication
ProxyCommand /usr/bin/corkscrew address-of-proxy 3128 %h %p
If your proxy need authentication, enable first ProxyCommand line and add in ~/.ssh/proxy_auth credentials for proxy :
user:password
Then launch your ssh tunnel through the proxy
ssh -D 9999 user@ssh-proxy
From this point, you can use your application with proxy socks enabled to localhost:9999 and you can reach the web.
if you just need to browse, you can directly forward your DNS queries through proxy socks with (in Firefox) :
about:config search string “dns” enable to “true” key “network.proxy.socks_remote_dns”
And now, how to send your DNS queries also through your ssh tunnel.
Install socat tool on your remote server AND on your local machine :
sudo apt-get install socat
On your remote server, launch socat to transform TCP request from 5353 to DNS UPD queries 53 (in this command, we use Google DNS) :
socat tcp4-listen:5353,reuseaddr,fork UDP:8.8.8.8:53
On your local machine, launch socat to transform local DNS queries to TCP port 5353 (need to be launched as root, since we listen on port 53) :
sudo socat -T15 udp4-recvfrom:53,reuseaddr,fork tcp:localhost:5353
Edit your /etc/resolv.conf file to add a “local DNS server” :
nameserver localhost
And eventually, launch a a specific DNS tunnel over SSH :
ssh -N -L 5353:localhost:5353 user@your-remote-server
You can ping real world 😉
To resume, once tools are installed, you need to launch (in this order) :
First terminal :
Second terminal :
Third terminal :
Thanks to : http://zarb.org/~gc/html/udp-in-ssh-tunneling.html / http://tcweb.org/wiki/Traverser_un_proxy
Use option during sfForm construction.
for example in your action:
$form = new myForm(null, array('attributeFoo' => $this->getUser()->getAttribute('attributeFoo'));and then retrieve the value inside the form class:
$this->getOption(‘attributeFoo’);
More information here : http://stackoverflow.com/questions/627585/how-to-get-user-data-in-form-in-symfony-1-2#2920785