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 / 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 / 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 / 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 (rsdio@metastatic.org), 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))'
@kunickiaj
kunickiaj / avro
Created October 5, 2017 21:12
spot avro schema for netflow
{
"type": "record",
"name": "RawFlowRecord",
"namespace": "com.cloudera.accelerators.flows.avro",
"fields": [{
"name": "treceived",
"type": ["string", "null"]
}, {
"name": "tryear",
"type": ["float", "null"]
@kunickiaj
kunickiaj / authoring.yaml
Created May 21, 2018 02:13
Control Hub Deployment YAML for Authoring Data Collector
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: authoring-datacollector
namespace: default
spec:
replicas: 1
template:
metadata:
labels: