Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mohan Balasundaram tuxfight3r

🏠
Working from home
View GitHub Profile
@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created Nov 9, 2017
How to Reset Kafka Consumer Group Offset
View how_to_reset_kafka_consumer_group_offset.md

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@lyubenov
lyubenov / itebooks.py
Last active Jun 21, 2020
Removes it-ebooks.info links from book's footers. Run python itebooks.py -f /sourcepath/books/thebook.pdf to cleanup your thebook.pdf file.
View itebooks.py
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656
374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e
View gist:84004a3b6964823e3ae6
#!/usr/bin/env python
import base64
import json
import os
import re
import yaml
YAML_CONFIG_FILE = os.environ.get('APPLICATION_CONFIG')
with open(YAML_CONFIG_FILE, 'r') as YAML_CONFIG:
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active Feb 22, 2021
Diagrams for Documentation
View gist:40e7946c0cff68a31cea

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII