This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install kafka-python before use | |
# pip install kafka-python | |
# | |
import argparse | |
from kafka import KafkaConsumer, TopicPartition | |
def main(): | |
parser = argparse.ArgumentParser(description='Kafka Listener') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_alive() { | |
test -f .up && find .up -fstype local -mmin -1 | |
}; | |
echo $(is_alive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Return my IP address | |
function myip() { | |
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | |
} |