Skip to content

Instantly share code, notes, and snippets.


Sam Bessalah samklr

Block or report user

Report or block samklr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
samklr / filebeat-kafka-template.json
Last active Mar 14, 2019
Kafka Logs + Filebeat + ES
View filebeat-kafka-template.json
"mappings": {
"_default_": {
"_all": {
"norms": false
"_meta": {
"version": "5.1.1"
"dynamic_templates": [
View filebeat-conf.yml
# BEGIN -- HAProxy logging configured by Ansible
- input_type: log
- /var/log/haproxy.log
document_type: haproxy
# END -- HAProxy logging configured by Ansible
# BEGIN -- Nginx logging configured by Ansible
- input_type: log
View 70-ec2-nvme-devices.rules
# Copyright (C) 2006-2016, Inc. or its affiliates.
# All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
# or in the "license" file accompanying this file. This file is
resource "aws_instance" "int_tableau_linux" {
key_name = "${var.key_name}"
ami = "${}"
instance_type = "m5.4xlarge"
iam_instance_profile = "${}"
vpc_security_group_ids = ["${}"]
associate_public_ip_address = false
subnet_id = "${}"
private_ip = "${var.dq_internal_dashboard_linux_instance_ip}"
View links.txt
kinit -t /etc/security/keytabs/c******-*****.keytab -k ****-info**t@NX.***.somewhere
samklr /
Last active Dec 20, 2018
Enabling RDS MySQL for Change Data Capture

Do this before you add any data to your instance.

For RDS : Create a Parameter Group with the following parameters changed :
- Set binlog_format = ROW
- Set binlog_row_image = FULL
- Set binlog_rows_query_log_events = ON (1)
- (Optional) Set max_allowed_packet = Max (Increase ...)

Once the instance is created with the above parameter group, you'll need to change retention time of the binlog

View spark_joins.scala
import spark.implicits._
case class Row(id: Int, value: String)
val r1 = Seq(Row(1, "A1"), Row(2, "A2"), Row(3, "A3"), Row(4, "A4")).toDS()
val r2 = Seq(Row(3, "A3"), Row(4, "A4"), Row(4, "A4_1"), Row(5, "A5"), Row(6, "A6")).toDS()
You can’t perform that action at this time.