Not easy, but doable:
Exporting the database:
$ mysqldump -uuser -p --opt --default-character-set=utf8 mabase > mabase.sql
Charset conversion:
| <?php | |
| class fooActions extends sfActions | |
| { | |
| /** | |
| * Changes current user culture, and redirect the user to the translated doctrine | |
| * route url he came from (especially useful when you have these pretty things | |
| * called translated slugs in your I18nized doctrine models). | |
| * | |
| * PLEASE NOTE: it might be the most awful piece of code I ever produced, but... | |
| * well, it works™ |
| <?php | |
| /** | |
| * @see ioCombinerResponse | |
| */ | |
| class RdcCombinerResponse extends ioCombinerResponse | |
| { | |
| /** | |
| * Use this to replace all the specified javascripts in the response | |
| * with the combined javascript | |
| */ |
| <?php | |
| /** | |
| * Generates a toucan. | |
| * | |
| */ | |
| class sfGenerateToucanTask extends sfTask | |
| { | |
| const TOUCAN = 'ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC |
| # code has moved there http://github.com/n1k0/chromium-updater |
| <?php | |
| /** | |
| * sfDatabase compatible MongoDB database backend driver | |
| * | |
| * @package database | |
| * @author Nicolas Perriault | |
| */ | |
| class sfMongoDatabase extends sfDatabase | |
| { | |
| /** |
| /** | |
| * truncatable - jQuery lightweight text truncation plugin | |
| * | |
| * Adapted from Philip Beel's code http://theodin.co.uk/blog/development/truncatable-jquery-plugin.html | |
| * | |
| * Copyright (c) 2010 Nicolas Perriault (http://prendreuncafe.com/blog/) | |
| * Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/) | |
| * | |
| * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
| * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. |
| <?php | |
| /** | |
| * Linkifies a text. Will use the `truncate_text` function of Symfony's Text helper. | |
| * | |
| * I'm not really proud of it, but eh, it works™. | |
| * | |
| * @param string $text Initial text | |
| * @param int $maxLength Max link caption length | |
| * @param Boolean $nofollow Add rel="nofollow" to generated links | |
| * |
| <?php | |
| require_once dirname(__FILE__).'/../vendor/php-markdown/markdown.php'; | |
| /** | |
| * Markdown Symfony Helper, require PHP Markdown library: http://michelf.com/projects/php-markdown/ | |
| * | |
| * The idea is to parse and render text written using the Markdown format directly from your | |
| * Symfony templates. | |
| * | |
| * Sample usage: |
| from django.db import models | |
| from django.db.models import Avg, Max, Min, Count | |
| class Fortune(models.Model): | |
| author = models.CharField(max_length=45, blank=False) | |
| title = models.CharField(max_length=200, blank=False) | |
| content = models.TextField(blank=False) | |
| pub_date = models.DateTimeField('date published', auto_now_add=True) | |
| votes = models.IntegerField(default=0) | |