Skip to content

Instantly share code, notes, and snippets.

View fgm's full-sized avatar

Frédéric G. MARAND fgm

View GitHub Profile
// Inspired by http://talks.golang.org/2014/go4java.slide#23
package main
import "github.com/davecgh/go-spew/spew"
type Person struct {
name string
}
// A solution to https://www.freelancer.com/projects/Google-Go/downloads-the-contents-com-Sees.html
package main
import (
"container/list"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@fgm
fgm / Symfony2 GraphvizDumper demo
Last active November 18, 2017 17:14
Demonstrate how to use the GraphViz Dumper in a Symfony 2.4 project.
<?php
/**
* @file
* gvdump.php
*
* @author: Frédéric G. MARAND <fgm@osinet.fr>
*
* @copyright (c) 2014 Ouest Systèmes Informatiques (OSInet).
*
* @license MIT
@fgm
fgm / annotations_loading.php
Created February 16, 2014 12:04
Demonstrates a Doctrine annotations loader not needing explicit paths.
<?php
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
$src = __DIR__ . '/../src';
$vendors = __DIR__ . '/../vendor';
require_once "$vendors/autoload.php";
class Loader {
@fgm
fgm / gist:8261606
Created January 4, 2014 22:31
A Symfony2 Console command to list the Doctrine DBAL valid column types and options.
<?php
/**
* @author: Frederic G. MARAND <fgm@osinet.fr>
*
* @copyright (c) 2013 Ouest Systèmes Informatiques (OSInet).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell