Skip to content

Instantly share code, notes, and snippets.

View d33pcode's full-sized avatar

Marco Panunzio d33pcode

View GitHub Profile
<?php //app/libraries/MultiUserProvider.php
use Illuminate\Auth\UserProviderInterface,
Illuminate\Auth\UserInterface,
Illuminate\Auth\GenericUser;
class MultiUserProvider implements UserProviderInterface {
protected $providers;
@d33pcode
d33pcode / gist:2df57caf6d95cf48b275
Created March 25, 2016 22:57 — forked from yograterol/gist:99c8e123afecc828cb8c
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" workaround
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround
Install `redhat-rpm-config`
$ sudo dnf install redhat-rpm-config
@d33pcode
d33pcode / gist:5a142a8ff697ef5735c1
Created February 5, 2016 11:07 — forked from markoheijnen/gist:6129265
Fantastich ElasticSearch: add numeric meta key
<?php
class My_Elasticsearch {
public function __construct() {
add_filter( 'elasticsearch_config_facets', array( $this, 'add_facets' ) );
add_filter( 'elasticsearch_config_fields', array( $this, 'add_fields' ) );
add_filter( 'elasticsearch_indexer_map_field', array( $this, 'indexer_map_field' ), 10, 2 );
add_filter( 'elasticsearch_indexer_build_document', array( $this, 'indexer_build_document' ), 10, 2 );
}