Trucs à vendre

Je me débarrasse de certaines affaires, avis aux amateurs :

Coffrets DVD des Simpsons
De la saison 1 à 11 (il manque la 10)... 10 € pièce, 70 € le tout.

Appareil photo Panasonic Lumix FZ18 noir (bridge)
8 MPixel, f=4,6-82,8mm (35mm équiv.: 28-504mm), description complète ici.
En très bon état, peu utilisé, vendu 150 € avec 2 cartes SDHC de 4Go.

Bureau
Très pratique, nombreux rangements, photo sur la fiche article Conforama.
A venir chercher à Puteaux, vendu 100 €.

Locate SWAP file on MacOS X

You will be able to find the swap file with the following command :

ps -wax | grep dynamic_pager -m1

And if you are using the default OS X configuration, you'll get something like that (swap file is /private/var/vm/swapfile) :

   34 ??         0:00.01 /sbin/dynamic_pager -F /private/var/vm/swapfile

Close a remote SSH session

To close all SSH sessions of a given user :

skill -KILL -u username

You can list connected users with the who command.

Replace string in MySQL query

UPDATE `table` SET `row` = REPLACE(`row`, 'from_string', 'to_string');

Using a custom config file with symfony 1.2/1.4

If you want to store some parameters in your own configuration file (other than /config/app.yml for different reasons) with your very own prefix, you just have to create a /config/config_handlers.yml file :

config/my_config_file.yml:
  class:    sfDefineEnvironmentConfigHandler
  param:
    prefix: myprefix_

Now, symfony will process your config file with sfDefineEnvironmentConfigHandler and add your parameters to global settings values with myprefix_ prefix. Don't forget to tell symfony to include your file, in your application configuration file (/app/myapp/config/myappConfiguration.class.php) :

<?php

class myappConfiguration extends sfApplicationConfiguration
{
  /* ... */

  public function initialize()
  {
    require_once($this->getConfigCache()->checkConfig('config/my_config_file.yml'));
  }
}

You can have more information about symfony internals by checking the /cache/myapp/myenv/config/config_settings.yml.php file.