If you want to clean up data from a topic and you don’t have any intermediate storage, it is easy to set the retention time to a few seconds and then wait until the cleanup process kicks in. After that, the retention time can be set to the default value:
./kafka-configs.sh --zookeeper localhost:2181 --alter --entity-type topics --add-config retention.ms=10000 --entity-name <topic-name>
I found this handy cheat sheet for Apache Kafka.
Whenever I need to memorize things of the form A -> B
, I use Anki. This free software comes for many platforms: Mac OS, Windows, Linux and allows the creation of flashcards. After creating the cards you can then go and quiz yourself and rate how good your answer was. Based on that an algorithm decides how often to show you the same card again. I personally find it super effective – if you don’t cheat.
With the following command you can find all currently running java processes:
ps aux | grep java
Of course this works for any arbitrary process.
It seems that there is finally a format which can replace the old and often ugly looking XML documents. JsonFeed is dead-simple and provides the same functionality as XML based feeds. This simple example illustrates how nice and clean feeds in JSON can look like:
{
"version": "https://jsonfeed.org/version/1",
"title": "My Example Feed",
"home_page_url": "https://example.org/",
"feed_url": "https://example.org/feed.json",
"items": [
{
"id": "2",
"content_text": "This is a second item.",
"url": "https://example.org/second-item"
},
{
"id": "1",
"content_html": "<p>Hello, world!</p>",
"url": "https://example.org/initial-post"
}
]
}