Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
# original script by brainflakes, improved by pageauc, peewee2 and Kesthal
# www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=45235
# You need to install PIL to run this script (not anymore)
# type "sudo apt-get install python-imaging-tk" in an terminal window to do this
# You need to install Astral :
# pip install astral
@nicolaskern
nicolaskern / ProductAdmin.php
Last active May 20, 2016 16:48 — forked from npotier/ProductAdmin.php
Use the code below to add the "add buton" to a sonata model autocomplete form Raw
<?php
// src/ACSEO/AdminBundle/Admin/ProductAdmin.php
// ...
protected function configureFormFields(FormMapper $formMapper)
{
// ...
$formMapper
->add('codes', 'sonata_type_model_autocomplete', array(