This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->_controller->Blogs = $this->getMockForModel( | |
'Blogs', | |
['save'], | |
['className' => 'Crud\Test\App\Model\Table\BlogsTable', 'table' => 'blogs'] | |
); | |
PHP Fatal error: Call to a member function schemaCollection() on a non-object in /var/www/crud3/htdocs/vendor/cakephp/cakephp/src/ORM/Table.php on line 336 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"size":60, | |
"sort":[ | |
{ | |
"is_sponsored":"desc" | |
}, | |
"_score", | |
{ | |
"is_experience":"desc" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> curl -X GET local.bownty.net:9200/bownty_da/deal/_search?pretty -d '{ | |
"fields" : ["name.raw"], | |
"query" : { | |
"match" : { "name": "*forbedret*" } | |
} | |
}' | |
{ | |
"took" : 2, | |
"timed_out" : false, | |
"_shards" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'name' => [ | |
'type' => 'string', | |
'index' => 'analyzed', | |
'store' => true, | |
'fields' => [ | |
'raw' => ['type' => 'string', 'index' => 'not_analyzed'], | |
'stemmed' => ['type' => 'string', 'analyzer' => 'stemmed'], | |
] | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X GET local.bownty.net:9200/bownty_da/deal/_search?pretty -d '{ | |
"query" : { | |
"wildcard" : { "name.raw": "*forbedret*" } | |
}, | |
"script_fields": { | |
"terms" : { | |
"script": "doc[field].values", | |
"params": { | |
"field": "name.stemmed" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Cake\Event\Event; | |
class PostsController extends AppController { | |
public $paginate = ['limit' => 5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
class AppController extends \Cake\Controller\Controller { | |
use \Crud\Controller\ControllerTrait; | |
public $viewClass = 'CrudView\View\CrudView'; | |
public $components = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_index": "logstash-production-2014.05.19", | |
"_type": "nginx", | |
"_id": "BxOr_N4lRs-tFAK9sewmag", | |
"_score": null, | |
"_source": { | |
"@timestamp": "2014-05-19T07:33:52.000Z", | |
"@version": "1", | |
"type": "nginx", | |
"source": "da.bownty.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class to help work with NewRelic in PHP | |
* | |
* @author Christian Winther | |
* @see https://docs.newrelic.com/docs/php/the-php-api | |
*/ | |
class NewRelic { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Global Locking using Redis | |
* | |
*/ | |
class RedisLock { | |
/** | |
* How long should the lock be kept active, even if the process dies | |
* |