Skip to content

Instantly share code, notes, and snippets.

View ant1fact's full-sized avatar

David Pacsuta ant1fact

  • Deutsche Telekom
  • Keszthely, Hungary
View GitHub Profile
@gmyrianthous
gmyrianthous / kafkacat-help
Created March 6, 2021 16:06
kafkacat-help
$ kafkacat -h
Usage: kafkacat <options> [file1 file2 .. | topic1 topic2 ..]]
kafkacat - Apache Kafka producer and consumer tool
https://github.com/edenhill/kafkacat
Copyright (c) 2014-2019, Magnus Edenhill
Version 1.6.0 (JSON, Avro, Transactions, librdkafka 1.6.1 builtin.features=gzip,snappy,ssl,sasl,regex,lz4,sasl_gssapi,sasl_plain,sasl_scram,plugins,zstd,sasl_oauthbearer)
General options:
@Julian-Nash
Julian-Nash / flask_sitemap_generator.py
Last active May 4, 2024 13:03
Flask dynamic sitemap generator
@app.route("/sitemap")
@app.route("/sitemap/")
@app.route("/sitemap.xml")
def sitemap():
"""
Route to dynamically generate a sitemap of your website/application.
lastmod and priority tags omitted on static pages.
lastmod included on dynamic content such as blog posts.
"""
from flask import make_response, request, render_template
@matthewjberger
matthewjberger / instructions.md
Last active June 15, 2024 15:42
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@YuMS
YuMS / update-git.sh
Created June 29, 2016 09:28
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@olooney
olooney / average_image_color.py
Created September 27, 2011 21:14
Average Image Color
from PIL import Image
def average_image_color(filename):
i = Image.open(filename)
h = i.histogram()
# split into red, green, blue
r = h[0:256]
g = h[256:256*2]
b = h[256*2: 256*3]