Skip to content

Instantly share code, notes, and snippets.

View baybatu's full-sized avatar
🏠
Working from home

Batuhan Bayrakci baybatu

🏠
Working from home
View GitHub Profile
@baybatu
baybatu / get-all-table-properties-in-presto.md
Created August 5, 2021 08:25
Get all properties of a table in Presto
@baybatu
baybatu / use-git-profile-by-directory.md
Created June 30, 2021 15:15
Using git profiles by current directory

~/.gitconfig:

[includeIf "gitdir:~/workspace/project1/**"]
    path = .gitconfig.project1
[includeIf "gitdir:~/workspace/project2/**"]
    path = .gitconfig.project2

~/.gitconfig.project1:

@baybatu
baybatu / delete-index-by-pattern-in-es.py
Created June 10, 2021 07:21
delete index by pattern in Elasticsearch with Python
# 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 April 26, 2021 08:55
use local ios pod on a demo project

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 October 13, 2022 11:21
Delete Redis keys by pattern
@baybatu
baybatu / zalenium-vs-selenium-grid-archs.md
Last active April 19, 2021 07:48
simple zalenium vs selenium grid (w/o docker) architecture comparison

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 April 3, 2021 13:55
uniq aracinin sadece komsu satirlari tekillestirmesi / uniq tool makes only adjacent rows unique

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 April 1, 2021 06:09
Couchbase kismi guncelleme / Partial document update in Couchbase
@baybatu
baybatu / openj9-vs-oracle-jvm-benchmark-graph.md
Last active March 26, 2021 11:31
simple openj9 and oracle jvm benchmark

25 Sept 2019

jvmbench

@baybatu
baybatu / generate-random-data-sequence-presto.sql
Last active March 25, 2021 08:25
Generate random data using Presto
select 5 from unnest(sequence(1, 6))
-- generates 6 row containing '5' as an example data
-- column
-- 5
-- 5
-- 5
-- 5
-- 5
-- 5