Skip to content

Instantly share code, notes, and snippets.

View veysiertekin's full-sized avatar

Veysi Ertekin veysiertekin

View GitHub Profile
language:java NOT android updated:>2017-08-12 stars:>500
@veysiertekin
veysiertekin / AkkaHttpClient.scala
Last active December 12, 2019 09:02
Akka AkkaHttp
import java.net.URI
import akka.Done
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{ContentTypes, HttpMethods, _}
import akka.stream.scaladsl.{Flow, Keep, Sink, Source, SourceQueueWithComplete}
import akka.stream.{ActorMaterializer, OverflowStrategy, QueueOfferResult}
import org.apache.log4j.Logger
CALL apoc.meta.stats() YIELD relTypes, relTypesCount
RETURN relTypes, relTypesCount
@veysiertekin
veysiertekin / plugins.md
Created October 20, 2019 19:17
Jenkins

AliOSSUploader

https://jenkins.io/doc/pipeline/steps/aliyun-oss-uploader/

Usage:

stage('copy jar') {
    aliyunOSSUpload accessKeyId: '<my_access_key>', accessKeySecret: '<my_secret_key>', bucketName: '<my_bucket>', endpoint: 'oss-<region>.aliyuncs.com', localPath: "/<path_to_file_name; path after current directory>", maxRetries: "3", remotePath: '/<oss_sub_full_path_including_file_name>'
}

How to take heapdump of a JVM process effiently?

Export a core dump with gdb tool

Install gdb

sudo yum install gdb

Following policy needed to be add with JindoFS:

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
 "oss:AbortMultipartUpload",
@veysiertekin
veysiertekin / 01-optimization.md
Last active June 30, 2022 08:35
Presto PrestoSQL

How to tune Presto?

Memory Optimization

JVM Params

-Xmx  -> (System Memory) * 7/9
@veysiertekin
veysiertekin / _1_datadog-installation.md
Last active September 10, 2020 12:20
Datadog Daemon JVM via JMX on Kubernetes

JVM Monitoring With Seperate Datadog Daemon (Without installing an agent within application Docker)

Install Datadog Daemon & JMX connection by following steps:

1- Create a secret for api key:

kubectl create secret generic datadog-secret --from-literal api-key="<add your api key here>"
@veysiertekin
veysiertekin / init.sh
Last active June 23, 2019 15:55
Phoenix Elixir
# install phoenix
mix archive.install hex phx_new 1.4.8
# create project without ecto & webpack
mix phx.new <project name> --no-ecto --no-webpack
# start server
cd <project name>
mix phx.server