Skip to content

Instantly share code, notes, and snippets.

View gffranco's full-sized avatar

Gabriel Fróes Franco gffranco

View GitHub Profile
@kosmolot
kosmolot / serialization.vala
Last active March 14, 2021 11:29
Vala partial serialization (using json-glib)
/*
* An example of serialization.
* This example serializes and deserializes only 'x' property.
*
* vala: 0.36.3
* json-glib: 1.3.2
*/
public class Point : GLib.Object, Json.Serializable {
public int x { get; set; }
@bjo3rnf
bjo3rnf / EntityHiddenType.php
Last active November 19, 2021 17:19
Hidden field for Symfony2 entities
<?php
namespace Dpn\ToolsBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Dpn\ToolsBundle\Form\DataTransformer\EntityToIdTransformer;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\Common\Persistence\ObjectManager;