Skip to content

Instantly share code, notes, and snippets.

View quan-nguyen2's full-sized avatar
💭
testing new keyboard

quan.nguyen2 quan-nguyen2

💭
testing new keyboard
View GitHub Profile
@quan-nguyen2
quan-nguyen2 / dump_kafka.sh
Last active November 9, 2022 10:28
this script dumps kafka topics to files by day
#!/usr/bin/env bash
set -e
if ! command -v kafka-run-class &>/dev/null; then
if ! command -v kafka-run-class.sh &>/dev/null; then
echo "kafka-run-class or kafka-run-class.sh could not be found in PATH"
exit 1
else
sh=1 # this is most likely we downloaded kafka binary and use *.sh files to working with kafka

demo click to expand

Click to expand!
  • sort bidder reversed by bid: i.e P1 has biggest budget; P(N) have smallest budget
  • P(i) with i > K bid for item[k]
  • P(i) with i <= K bid for the item[i], with price
    • 1+budget[i+1] if player i-th exists
  • MIN_BID if player (i+1)-th exists

basic rules

from high priority to lower priority

  • git-history aims to help you understand life-time of the project (3)
  • keep that (history of code) clean
  • git aims to help developers' life easier (1)
  • you must pay for something (life-easy) before having it, so let's learn to using git first
  • we (you and me) don't have much fuck to give, so let's make less fuck (2)

more details