Skip to content

Instantly share code, notes, and snippets.

@datlife
datlife / notes.md
Last active May 25, 2022 14:55
Setup Apache Spark/ Jupyter Notebook on MacOS
@u20024804
u20024804 / install-s3distcp.sh
Created November 22, 2018 09:30 — forked from jordangraft/install-s3distcp.sh
install-s3distcp.sh
$ s3cmd get s3://us-east-1.elasticmapreduce/libs/s3distcp/1.latest/s3distcp.jar
$ hadoop jar ./s3distcp.jar --src s3a://<bucket>/input/ --dest=s3a://<bucket>/output
@dleske
dleske / k8s-update-secret.md
Last active January 29, 2024 17:12
k8s: Updating a Secret

Hopefully helped another k8s newbie with the following. The question was, how do you update a single key in a secret in k8s? I don't know anything about secrets but I will probably want to know this in the future, so here we go.

First, to create a dummy secret:

apiVersion: v1
kind: Secret
metadata:
  name: test-secret
data:
@forestjohnsonpeoplenet
forestjohnsonpeoplenet / topic-last-messages.sh
Last active December 14, 2018 21:03
Consume Last N messages from a kafka topic on the command line
#!/bin/bash
if [ -z "$1" ]
then
echo "Missing first argument, zookeeper host port like: my-zookeeper-hostname:2181"
echo "Usage Example: ./topic-last-messages.sh my-zookeeper-hostname:2181 MY_TOPIC_NAME 10 America/Chicago"
exit 1
fi
if [ -z "$2" ]
@sahilsk
sahilsk / kafka-cheat-sheet.md
Last active April 12, 2024 01:27 — forked from filipefigcorreia/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1