Skip to content

Instantly share code, notes, and snippets.

View diimpp's full-sized avatar

Dmitri Perunov diimpp

  • Symfony/Sylius developer
  • Novosibirsk, Russia
View GitHub Profile
@sirbarrence
sirbarrence / rxDecorateDirective.js
Last active September 6, 2016 10:29
A function to decorate some stock AngularJS 1.x directives to accept RxJS Observables. Finished product of https://barrysimpson.net/posts/rx-directive-decorators and https://barrysimpson.net/posts/rx-directive-decorators-update1
'use strict';
function rxDecorateDirective($provide, directiveName) {
// Duck-typing function lifted from the rx.js source.
function isObservable(obj) {
return obj && typeof obj.subscribe === 'function';
}
$provide.decorator(directiveName + 'Directive', ['$delegate', 'rx', function($delegate, rx) {
var directiveConfig = $delegate[0];
@feyyazesat
feyyazesat / sf2Exceptions
Created September 23, 2014 18:17
Symfony 2 Exception List
Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php
Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php
Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php
Symfony/Component/Serializer/Exception/InvalidArgumentException.php
Symfony/Component/Serializer/Exception/UnsupportedException.php
Symfony/Component/Serializer/Exception/UnexpectedValueException.php
Symfony/Component/Serializer/Exception/LogicException.php
Symfony/Component/Serializer/Exception/Exception.php
Symfony/Component/Serializer/Exception/RuntimeException.php
Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
@lukas-vlcek
lukas-vlcek / gist:5143799
Last active February 7, 2023 21:50
Adding a new analyzer into existing index in Elasticsearch (requires close/open the index). Tested with Elasticsearch 0.19.12.
// create an index with an analyzer "myindex"
curl -X PUT localhost:9200/myindex -d '
{
"settings" : {`
"index":{
"number_of_replicas":0,
"number_of_shards":1,
"analysis":{
"analyzer":{
"first":{
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.