docker run -it --rm -p 5551:5432 --name=db1 --hostname=db1 ubuntu:20.04 bash
docker run -it --rm -p 5552:5432 --name=db2 --hostname=db2 ubuntu:20.04 bash
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 ...
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
# bash completion for redis-cli and redis-server | |
have redis-server && | |
_redisserver() | |
{ | |
local cur prev split=false | |
COMPREPLY=() | |
_get_comp_words_by_ref cur prev |
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
import io.searchbox.Action; | |
import io.searchbox.client.JestClient; | |
import io.searchbox.client.JestClientFactory; | |
import io.searchbox.client.JestResult; | |
import io.searchbox.client.config.ClientConfig; | |
import io.searchbox.core.Bulk; | |
import io.searchbox.core.Bulk.Builder; | |
import io.searchbox.core.Index; | |
import io.searchbox.core.Search; | |
import io.searchbox.core.SearchScroll; |
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
for (plugin in ["ant", | |
"artifactdeployer", | |
"build-failure-analyzer", | |
"build-name-setter", | |
"build-pipeline-plugin", | |
"build-timeout", | |
"claim", | |
"clone-workspace-scm", | |
"cobertura", | |
"collapsing-console-sections", |
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
#!/bin/bash | |
# Setup | |
# | |
# - Create a new Jenkins Job | |
# - Mark "None" for Source Control Management | |
# - Select the "Build Periodically" build trigger | |
# - configure to run as frequently as you like | |
# - Add a new "Execute Shell" build step | |
# - Paste the contents of this file as the command |
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
1. | |
Paste it to the bash: | |
git config --global alias.lg "log --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%cr) %C(bold blue)%an <%ae>%Creset' --abbrev-commit" | |
2. | |
Then in any git repo type: git lg | |
3. | |
Enjoy |