Skip to content

Instantly share code, notes, and snippets.

View a-r-m-i-n's full-sized avatar

Armin Vieweg a-r-m-i-n

View GitHub Profile
@a-r-m-i-n
a-r-m-i-n / DeletedFilter.php
Last active August 9, 2019 23:41 — forked from baptistedonaux/DeletedFilter.php
Soft Delete Symfony/Doctrine
<?php
namespace Namespace\MyBundle\Repository\Filters;
use Doctrine\ORM\Mapping\ClassMetaData;
use Doctrine\ORM\Query\Filter\SQLFilter;
class DeletedFilter extends SQLFilter
{
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
@a-r-m-i-n
a-r-m-i-n / purge.sh
Last active September 6, 2017 20:04 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
#!/bin/bash
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
# rm -rf /var/www/html/*
# BE CAREFUL with synched folders!!!
rm -rf ~/.composer/vendor/*