bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/openjdk:8-jdk | |
steps: | |
- checkout | |
- restore_cache: | |
key: scala-library-dependencies-{{ checksum "build.sbt" }} | |
- run: sbt test:compile |
kafka-run-class kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic xxx --time -1 --offsets 1 | awk -F ':' '{sum += $3} END {print sum}' |
# Place this file in ~/.config/systemd/user/ssh-auth-sock.service | |
# $ systemctl --user daemon-reload | |
# $ systemctl --user enable --now ssh-auth-sock.service | |
# Add 'echo UPDATESTARTUPTTY | gpg-connect-agent >/dev/null' in your ~/.bashrc. | |
# Logout or reboot. | |
[Unit] | |
Description=Set SSH_AUTH_SOCK to GnuPG agent | |
[Service] |
import java.util.UUID | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model.HttpRequest | |
import akka.http.scaladsl.model.headers.{ModeledCustomHeader, ModeledCustomHeaderCompanion} | |
import akka.stream.ActorMaterializer | |
import akka.http.scaladsl.server._ | |
import scala.io.StdIn |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
import sangria.ast | |
import sangria.execution.Executor | |
import sangria.marshalling.{InputUnmarshaller, ScalarValueInfo, ArrayMapBuilder, ResultMarshaller} | |
import sangria.schema._ | |
import sangria.validation.{ValueCoercionViolation, IntCoercionViolation, BigIntCoercionViolation} | |
import spray.json._ | |
import sangria.macros._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
implicit object CustomSprayJsonResultMarshaller extends ResultMarshaller { |
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
# core | |
brew install coreutils | |
# key commands | |
brew install binutils | |
brew install diffutils | |
brew install ed --default-names | |
brew install findutils --with-default-names |
COPY /docker-entrypoint.sh / | |
COPY /docker-entrypoint.d/* /docker-entrypoint.d/ | |
ONBUILD COPY /docker-entrypoint.d/* /docker-entrypoint.d/ | |
ENTRYPOINT ["/docker-entrypoint.sh", "/opt/puppetlabs/puppet/bin/mcollectived"] | |
CMD ["--no-daemonize"] |
# From https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" | |
brew install coreutils | |
brew install gnu-tar --with-default-names | |
# alternatively | |
brew install binutils | |
brew install diffutils |