Skip to content

Instantly share code, notes, and snippets.

Avatar
⛰️
Remote

Haydar KÜLEKCİ hkulekci

⛰️
Remote
View GitHub Profile
@hkulekci
hkulekci / 0-README.md
Created Apr 27, 2020
Turkish Stemmer PHP Test
View 0-README.md

Sample Usage For the PHP Turkish Stemmer Project

You can download the gist as zip and open it. After open it, run the below command:

composer install

Then our environment ready. Just run the file :

@hkulekci
hkulekci / php7.0-fpm-pool-www.conf
Last active Aug 1, 2020
PHP FPM www configuration example for a little server
View php7.0-fpm-pool-www.conf
; Choose how the process manager will control the number of child processes.
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;
; dynamic - the number of child processes are set dynamically based on the
; following directives. With this process management, there will be
; always at least 1 children.
; pm.max_children - the maximum number of children that can
; be alive at the same time.
; pm.start_servers - the number of children created on startup.
; pm.min_spare_servers - the minimum number of children in 'idle'
@hkulekci
hkulekci / size.md
Last active Feb 29, 2020
Elasticsearch Nested Array Object Size Aggregation
View size.md
# images field type is nested
GET products/_search
{
  "track_total_hits": true, 
  "size": 0, 
  "aggs": {
    "counts": {
      "terms": {
        "script": "params['_source']['images'].size()",
@hkulekci
hkulekci / sample_uuid_elasticsearch.java
Created Aug 13, 2019
Elasticsearch UUID Generator Part
View sample_uuid_elasticsearch.java
//*******************************************************************
// Welcome to CompileJava!
// If you experience any issues, please contact us ('More Info') -->
// Sorry that the "Paste" feature no longer works! GitHub broke it.
//*******************************************************************
import java.lang.Math; // headers MUST be above the first class
/*
@hkulekci
hkulekci / trait_example.php
Last active May 15, 2019
Name Trait Method to Override
View trait_example.php
<?php
trait A {
public static function dispatch()
{
var_dump(func_get_args());
return new static(...func_get_args());
}
}
@hkulekci
hkulekci / example.md
Created May 2, 2019
Esalticsearch Example Usage
View example.md
DELETE demodata


PUT demodata
{
  "mappings": {
    "document": {
      "properties": {
        "documentName": {
@hkulekci
hkulekci / elastic.md
Last active Apr 26, 2019
Standard Analyzer Weird Result
View elastic.md
########

GET _analyze
{
  "text": ["document.txt"], 
  "analyzer": "standard"
}

{
@hkulekci
hkulekci / dynamic_templates.md
Last active Mar 2, 2019
Elasticsearch Dynamic Templates Example
View dynamic_templates.md
DELETE products

PUT products
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  },
  "mappings": {
@hkulekci
hkulekci / index.md
Last active Feb 12, 2019
Index Preparing For Medium Blog
View index.md
DELETE products

PUT products
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  },
  "mappings": {
View container-example-2.php
<?php
class Container
{
protected $container = [];
public function add($a)
{
$this->container[] = $a;
}
You can’t perform that action at this time.