Skip to content

Instantly share code, notes, and snippets.

View kunickiaj's full-sized avatar
:octocat:
¯\_(ツ)_/¯

Adam Kunicki kunickiaj

:octocat:
¯\_(ツ)_/¯
View GitHub Profile
@kunickiaj
kunickiaj / StreamSets Data Collector Example Dashboard
Last active January 12, 2016 22:38
Example Grafana Dashboard for StreamSetse Data Collector
{
"id": 1,
"title": "StreamSets Data Collector",
"originalTitle": "StreamSets Data Collector",
"tags": [],
"style": "dark",
"timezone": "utc",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
@kunickiaj
kunickiaj / spark-streaming-kafka.diff
Created November 10, 2015 00:15
Patch to rebuild spark-streaming-kafka jar to work with HDP 2.3.2
diff --git a/external/kafka/pom.xml b/external/kafka/pom.xml
index 8a43eb7..59e9b62 100644
--- a/external/kafka/pom.xml
+++ b/external/kafka/pom.xml
@@ -28,6 +28,7 @@
<artifactId>spark-streaming-kafka_2.10</artifactId>
<properties>
<sbt.project.name>streaming-kafka</sbt.project.name>
+ <kafka.version>0.8.2.2.3.2.0-2950</kafka.version>
</properties>
@kunickiaj
kunickiaj / collectd2influx.py
Last active November 15, 2015 23:38
Python script to convert collectd records to influxdb format
#
# Sample Jython code
#
# Available Objects:
#
# records: an array of records to process, depending on Jython processor
# processing mode it may have 1 record or all the records in the batch.
#
# state: a dict that is preserved between invocations of this script.
# Useful for caching bits of data e.g. counters.
@kunickiaj
kunickiaj / jmxdemo.yml
Created January 12, 2016 21:59
StreamSets Data Collector JMX Monitoring Docker Compose Demo
datacollector:
image: 'streamsets/datacollector:1.1.4'
environment:
- 'SDC_JAVA_OPTS=-Dcom.sun.management.jmxremote.port=1105 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false'
expose:
- '1105'
ports:
- '18630:18630'
grafana:
image: 'grafana/grafana:latest'
@kunickiaj
kunickiaj / jmxtrans.yml
Created January 12, 2016 22:16
StreamSets Data Collector Sample YAML for jmxtrans
# Host/Port Grahpite listens on
graphite_host: "JMXTRANS_GRAPHITE_HOST"
graphite_port: "JMXTRANS_GRAPHITE_PORT"
# Global port to query JMX on
# query_port and global_host_alias are mandatory
# Will accept a blank space if alias and host is provided in host sets
query_port: "JMXTRANS_JMX_PORT"
global_host_alias: "JMXTRANS_JMX_HOST"
@kunickiaj
kunickiaj / ChangePassword.java
Created April 21, 2016 15:32 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall ([email protected]), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{

Keybase proof

I hereby claim:

  • I am kunickiaj on github.
  • I am kunickiaj (https://keybase.io/kunickiaj) on keybase.
  • I have a public key ASCKol5Y-6Y6DSN7QhQtPudQlpuVhD_1F3P3xANNZgmP0Qo

To claim this, I am signing this object:

@kunickiaj
kunickiaj / Dockerfile
Created September 30, 2016 00:22
centos based image for datacollector
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@kunickiaj
kunickiaj / kv.js
Created November 15, 2016 17:31
SDC JavaScript Key Value Splitter
for(var i = 0; i < records.length; i++) {
try {
records[i].value = com.google.common.base.Splitter.on(", ").withKeyValueSeparator("=").split(records[i].value['text'])
// Write record to procesor output
output.write(records[i]);
} catch (e) {
// Send record to error
error.write(records[i], e);
}
@kunickiaj
kunickiaj / .gitconfig
Created June 23, 2017 21:50
git aliases
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
bl = for-each-ref --sort=refname:short refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'