Skip to content

Instantly share code, notes, and snippets.

@AlmogBaku
AlmogBaku / UserParamConverter.php
Created May 10, 2015 18:02
Symfony ParamConverter for lookup user by `me`
<?php
/**
* @author Almog Baku
* almog@GoDisco.net
* http://www.GoDisco.net/
*
* 10/05/15 18:43
*/
namespace Rimoto\SubscriberBundle\Request\ParamConverter;
@AlmogBaku
AlmogBaku / RestController.php
Created April 16, 2015 10:29
Symfony2 REST post ctrl
/**
* Create new service
* @Post("/services/")
*
* @View("::api.html.twig")
* @Security("has_role('ROLE_ADMIN')")
*
* @ApiDoc(
* authenticationRoles={"Admin"},
* input="Rimoto\PolicyBundle\Form\SCEServiceType",
@AlmogBaku
AlmogBaku / README.md
Last active August 29, 2015 14:11
Install Mean.io on ubuntu

Install Mean.io on Ubuntu

Just run the follow command:

curl https://gist.githubusercontent.com/AlmogBaku/8820549bf853f6e5aef3/raw/afb0176e60b47952017be3761c458a56a624a579/meanInstall.sh | sh
@AlmogBaku
AlmogBaku / README.md
Last active August 29, 2015 13:56
DoctrineExtenstions: Sluggable: allow non-latin slugs

Allow non-latin slugs using DoctrineExtensions sluggable.

Instructions

  1. add the slugger class (change the namespace of course)
  2. if you using symfony, add the missing lines to your sluggable service as described in symfony-services.yml
  3. if you using only with PHP, call the sluggable service method as described in call.php