Skip to content

Instantly share code, notes, and snippets.

VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.6.3"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "boot2docker"
config.vm.box = "yungsang/boot2docker"
config.vm.box_check_update = false
@michaelsauter
michaelsauter / BasePresenter.php
Last active February 6, 2024 12:56
Simple presenter pattern for Symfony2/Twig. Really useful to get some view logic out of the models and views into its own separate space.
<?php
namespace Acme\DemoBundle\Presenter;
class BasePresenter
{
protected $subject;
public function __construct($subject)
{
# Setup NFS share between Mac (client/host) and Debian/Ubutnu (server/guest)
# Find out IP of host (host-only adapter, sth like vboxnet0 (check settings of guest in Virtualbox). The IP should be sth like 192.168.56.1)
ifconfig
# Get NFS on the guest system
sudo apt-get install nfs-kernel-server nfs-common portmap
# Find out user ID and group ID of your user on the guest system (likely 1000/1000)
id
# Edit /etc/exports
sudo vim /etc/exports
# Insert the user/group IDs and the IP of the host