Skip to content

Instantly share code, notes, and snippets.

@mans2singh
mans2singh / cloudwatch_logs_download.sh
Created June 20, 2023 05:39 — forked from meyju/cloudwatch_logs_download.sh
Script downloads all logs from aws cloudwatch logs
#!/usr/bin/env bash
#
# Copyright 2015 Julian Meyer
#
# Licensed 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@mans2singh
mans2singh / kinesis-get-records.sh
Created May 29, 2023 15:40 — forked from codemedic/kinesis-get-records.sh
Get records from a AWS Kinesis Data Stream. It allows you to start iterating from a time in the past.
#!/usr/bin/env bash
if ! aws_bin="$(which aws)" 2>/dev/null; then
echo "aws cli is missing; you can get it from https://aws.amazon.com/cli/"
exit 1
fi
if ! jq_bin="$(which jq)" 2>/dev/null; then
echo "jq is missing; you can get it from https://stedolan.github.io/jq/"
exit 1
@mans2singh
mans2singh / convert-p12-pem-formats.bash
Created November 15, 2022 19:21 — forked from Integralist/convert-p12-pem-formats.bash
Convert a P12 into a PEM and vice versa
# Convert p12 to pem
openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts -nodes
# Convert pem to p12
openssl pkcs12 -export -in certificate.pem -out certificate.p12 -passout pass:password
@mans2singh
mans2singh / NIFI InfluxDB Flow File Driven Template
Last active March 26, 2018 03:58
Docker InfluxDB + curl loader
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>5a947580-0162-1000-5d8d-992c13e7c294</groupId>
<name>InfluxDB Flow File Driven Template</name>
<snippet>
<connections>
<id>f1bbac26-89dd-30a9-0000-000000000000</id>
<parentGroupId>d4087a54-b4ad-383b-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@mans2singh
mans2singh / EmbeddedKafkaCluster.java
Created February 25, 2018 00:08 — forked from vmarcinko/EmbeddedKafkaCluster.java
Embedded Zookeeper & Kafka cluster
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;