Skip to content

Instantly share code, notes, and snippets.

View tuancode's full-sized avatar

tuancode tuancode

  • Sydney, Australia
View GitHub Profile
@tuancode
tuancode / ExtendedArrayCollection.php
Created September 1, 2020 14:27 — forked from jamesmoey/ExtendedArrayCollection.php
Extend array collection from Doctrine with operation to perform on all the item in the collection.
<?php
namespace Collections;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\PropertyAccess\PropertyAccess;
class ExtendedArrayCollection extends ArrayCollection
{
/**
@tuancode
tuancode / DeletedFilter.php
Created March 29, 2020 02:16 — 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)
{
# dconf reset /org/gnome/terminal/legacy/profiles:/
# dconf load /org/gnome/terminal/legacy/profiles:/ < gnome-terminal-profile.dconf
[/]
list=['be69e08b-abeb-484d-80cc-a803a66f388f']
default='be69e08b-abeb-484d-80cc-a803a66f388f'
[:be69e08b-abeb-484d-80cc-a803a66f388f]
foreground-color='rgb(235,219,178)'
rewrap-on-resize=true
visible-name='Gruvbox Dark'
@tuancode
tuancode / README-Template.md
Created February 4, 2018 07:51 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tuancode
tuancode / .bash_aliases
Last active January 8, 2020 21:59
dotfiles
# php xdebug
alias php-debug='php -d xdebug.remote_autostart=1'