Skip to content

Instantly share code, notes, and snippets.

View lwiesel's full-sized avatar

Laurent Wiesel lwiesel

View GitHub Profile
@lwiesel
lwiesel / ParameterContainerTrait.php
Last active January 7, 2016 17:19
A PHP trait that adds to each attribute methods `getXxx`, `setXxx`, `isXxx` and `hasXxx`
<?php
namespace Domain\Model;
/**
* Behavior for parameters classes
*
* For a given attribute, it will add methods `getXxx`, `setXxx`, `isXxx` and `hasXxx`
* ex:
* an attribute `$foo` will be settable with `setFoo('bar')`
@lwiesel
lwiesel / instructions.md
Created March 24, 2015 15:21
Set-up a proxmox behind one single IP

Sur la machine hôte, ouvrez /etc/network/interfaces

Déclarez une nouvelle interface en ajoutant les lignes suivantes :

auto vmbr2
iface vmbr2 inet static
	address 10.0.0.1
	netmask 255.255.255.0
	network 10.0.0.0
	broadcast 10.0.0.255
@lwiesel
lwiesel / Controller
Created November 19, 2014 15:09
Markdown documentation
<?php
namespace ChessyWeb\Bundle\CatteryBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Yaml\Parser;
use Parsedown;
use ParsedownExtra;
class DocumentationController extends Controller
@lwiesel
lwiesel / export vagrant
Last active August 29, 2015 13:57
Vagrant toolbox
# Export d'une box
vagrant package existing_instance_name --output new_instance_name.box
# Ajout d'une box en local
vagrant box add new_instance_name new_instance_name.box