Skip to content

Instantly share code, notes, and snippets.

View AlmogBaku's full-sized avatar
👨‍🦰
The Father of Contexts

Almog Baku AlmogBaku

👨‍🦰
The Father of Contexts
View GitHub Profile
@AlmogBaku
AlmogBaku / PatchedOAuth2.php
Created December 6, 2015 00:29
Patched OAuth Server to allow `password` grant without secret
<?php
/**
* Created by PhpStorm.
* User: AlmogBaku
* Date: 04/12/2015
* Time: 3:13 PM
*/
namespace Rimoto\ApiBundle\Security;
@AlmogBaku
AlmogBaku / IndicatorAggregator.java
Created May 14, 2015 21:40
Indicator Aggregation for PageViewIndicator
package net.rimoto.android.utils;
import android.support.v4.view.ViewPager;
import com.viewpagerindicator.PageIndicator;
import java.util.ArrayList;
/**
* Indicator Aggregator
*/
public class IndicatorAggregator implements PageIndicator {
@AlmogBaku
AlmogBaku / UserParamConverter.php
Created May 10, 2015 18:02
Symfony ParamConverter for lookup user by `me`
<?php
/**
* @author Almog Baku
* [email protected]
* 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