Skip to content

Instantly share code, notes, and snippets.

View hkulekci's full-sized avatar

Haydar KÜLEKCİ hkulekci

View GitHub Profile
hkulekci / QdrantServiceProvider.php
Created February 24, 2024 05:14
Qdrant Laravel
* @since Apr 2023
* @author Haydar KULEKCI <>
namespace App\Providers;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
hkulekci / 01 -
Last active December 28, 2023 19:35
Download Folder Recursively for Box Cloud


Create an app through developer platform :


Then later, get the service account email from the general settings :

hkulekci /
Last active September 9, 2023 09:00
terms_set Query
DELETE job-candidates

PUT job-candidates
  "mappings": {
    "properties": {
      "name": {
        "type": "keyword"
hkulekci /
Last active September 9, 2023 04:53
Percolator Field with Nested Query
PUT testindex1
  "mappings": {
    "properties": {
      "search": {
        "properties": {
          "query": { 
            "type": "percolator" 
hkulekci /
Created June 28, 2023 14:08
Some Sample Data
The clear, refreshing taste of tap water quenches my thirst on hot summer days.
Please make sure to filter the tap water before drinking it.
The tap in the kitchen was leaking, causing the water to drip incessantly.
After a long hike, we refilled our water bottles with tap water from the nearby fountain.
It's important to conserve tap water and use it wisely to protect our natural resources.
The tap water in this area has a slightly metallic taste, which can be off-putting to some people.
The plumber fixed the broken tap, ensuring a steady flow of water throughout the house.
My grandma always used to boil tap water before using it in cooking or drinking.
The city council implemented a new filtration system to improve the quality of tap water.
hkulekci /
Last active April 29, 2023 08:04
Kinesis Queue Check
import boto3
def check_kinesis_stream_data(stream_name):
# Create a Kinesis client using your AWS credentials
kinesis_client = boto3.client('kinesis')
# Get the shard iterator for the specified stream
shard_response = kinesis_client.describe_stream(StreamName=stream_name)
shard_id = shard_response['StreamDescription']['Shards'][0]['ShardId']
shard_iterator_response = kinesis_client.get_shard_iterator(
hkulekci /
Created December 11, 2022 06:21
Long named Aggregation test
GET idx_test/_search
  "size": 0,
  "aggs": {
hkulekci / nginx-kibana.conf
Last active October 19, 2022 05:52 — forked from dmajorel/nginx-kibana.conf
Nginx configuration for Kibana-ElasticSearch read-only/read-write access
upstream elasticsearch_upstream {
keepalive 15;
upstream kibana_upstream {
# Kibana, public access, RO operations
hkulekci /
Created July 12, 2022 07:32
What is the mean of "value borrowed here after move"
pub fn run() {
// Correct One
let hello1 = "Hello";
let mut hello2 = String::from("Hello");
println!("{}", hello1.len());
println!("{}", hello2.len());
println!("{:?}", (hello1, hello2));
hkulekci /
Created May 27, 2022 08:04
percentiles aggregation
POST test_index/_bulk
{"index": {"_id": 1}}
{"price": 68}
{"index": {"_id": 2}}
{"price": 74}
{"index": {"_id": 3}}
{"price": 74}
{"index": {"_id": 4}}
{"price": 118}