Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Batuhan Bayrakci baybatu

🏠
Working from home
View GitHub Profile
@baybatu
baybatu / delete-index-by-pattern-in-es.py
Created Jun 10, 2021
delete index by pattern in Elasticsearch with Python
View delete-index-by-pattern-in-es.py
# usage
# python delete-index-by-pattern-in-es.py http://ES_HOST:9200 my-es-index-*
# indexes matched with pattern you entered will be deleted
from elasticsearch import Elasticsearch
import sys
es_host = sys.argv[1]
index_pattern = sys.argv[2]
print(f"es_host:{es_host} ; index_pattern:{index_pattern}")
@baybatu
baybatu / use-local-pod-on-demo-project.md
Last active Apr 26, 2021
use local ios pod on a demo project
View use-local-pod-on-demo-project.md

harray-ios-sdk projesini local'deki demo bir ios projesinde kullanabilmek icin adimlar:

  • localde bi ios projesi olustur (orn: batuiostest)
  • Kullanacagin modulun (harray-ios-sdk) kaynak kodlarini bu projenin icine kopyala
  • Ana dizinde Podfile olustur (ruby kodu icerecek) ve sunu koy:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'batuiostest' do
@baybatu
baybatu / delete-redis-keys-by-pattern.md
Last active Apr 22, 2021
Delete Redis keys by pattern
View delete-redis-keys-by-pattern.md
@baybatu
baybatu / zalenium-vs-selenium-grid-archs.md
Last active Apr 19, 2021
simple zalenium vs selenium grid (w/o docker) architecture comparison
View zalenium-vs-selenium-grid-archs.md

Following diagram depicts Jenkins as the test runner. Zalenium Hub spawns docker containers that each one include target browsers that we want to run our test on.

zalenium_arch

@baybatu
baybatu / uniq-tekillestirme-yontemi.md
Last active Apr 3, 2021
uniq aracinin sadece komsu satirlari tekillestirmesi / uniq tool makes only adjacent rows unique
View uniq-tekillestirme-yontemi.md

uniq araci sadece komsu satirlari kullanarak tekillestirme yapar.

$ cat test.txt
a
a
a
b
b
c
@baybatu
baybatu / couchbase-partial-document-update.md
Last active Apr 1, 2021
Couchbase kismi guncelleme / Partial document update in Couchbase
View couchbase-partial-document-update.md
@baybatu
baybatu / generate-random-data-sequence-presto.sql
Last active Mar 25, 2021
Generate random data using Presto
View generate-random-data-sequence-presto.sql
select 5 from unnest(sequence(1, 6))
-- generates 6 row containing '5' as an example data
-- column
-- 5
-- 5
-- 5
-- 5
-- 5
-- 5
@baybatu
baybatu / yaml-cift-tirnak.md
Last active May 3, 2021
Iyi pratik ornegi olarak Yaml dosyalarinda cift tirnak kullanimi
View yaml-cift-tirnak.md

Yaml dosyalarda yes, on, true gibi degerlerin hepsi boolean true degerine eslestiriliyor. Bu da gozden kactiginda tespiti zor buglara neden oluyor.

Bu tarz sorunlardan bastan kacinmak icin string alanlari cift tirnak ile cevrelemek iyi bir pratik.

🚫 Kotu ornek:

watermark:
  - no
  - yes
@baybatu
baybatu / flink-classnotfoundexception-fix.md
Last active Mar 11, 2021
Flink fix of java.lang.ClassNotFoundException: org.apache.flink.api.scala.typeutils.CaseClassTypeInfo
View flink-classnotfoundexception-fix.md