Skip to content

Instantly share code, notes, and snippets.

View tuxfight3r's full-sized avatar
:octocat:
Working from home

Mohan Balasundaram tuxfight3r

:octocat:
Working from home
View GitHub Profile
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

#!/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:
@lyubenov
lyubenov / itebooks.py
Last active January 3, 2024 22:01
Removes it-ebooks.info links from book's footers. Run python itebooks.py -f /sourcepath/books/thebook.pdf to cleanup your thebook.pdf file.
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656
374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e
@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

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)