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 ...
| #!/bin/bash | |
| # Minimum TODOs on a per job basis: | |
| # 1. define name, application jar path, main class, queue and log4j-yarn.properties path | |
| # 2. remove properties not applicable to your Spark version (Spark 1.x vs. Spark 2.x) | |
| # 3. tweak num_executors, executor_memory (+ overhead), and backpressure settings | |
| # the two most important settings: | |
| num_executors=6 | |
| executor_memory=3g |
| #!/bin/bash | |
| repos=( | |
| "/c/projects/project-1" | |
| "/c/projects/project-2" | |
| "/c/projects/project-3" | |
| ) | |
| echo "" | |
| echo "Getting latest for" ${#repos[@]} "repositories using pull --rebase" |
| #!/bin/bash | |
| ################ | |
| # Uncomment if you want the script to always use the scripts | |
| # directory as the folder to look through | |
| #REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| REPOSITORIES=`pwd` | |
| IFS=$'\n' |
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 ...
| sudo yum remove docker docker-common docker-selinux docker-engine | |
| sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
| sudo yum install docker-ce | |
| rpm -ivh http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.42-1.gitad8f0f7.el7.noarch.rpm |
| version: "3.3" | |
| services: | |
| kong: | |
| image: kong:latest | |
| container_name: kong | |
| networks: | |
| - kong-net | |
| ports: | |
| - "8000:8000" | |
| - "8443:8443" |
| #!/bin/bash | |
| # Simple install script for stock RedHat/CentOS 7.x | |
| # Allows yum update to pull security & other fixes automatically from MongoDB.com's repos | |
| # (versus ancient packages in Red Hat/Cent repos) | |
| # To completely purge all remnants of Mongo (repo conf, rpms, yum cache, DB files, kernel tweaks: | |
| # sudo service mongod stop ; sudo rm -rf /etc/yum.repos.d/mongo* ; sudo rm -rf /var/lib/mongo/* ; sudo sed -i.`date +%Y-%m-%d_%H-%M-%S`.bak '/^#.*$/!d' /etc/rc.d/rc.local ; sudo rm -rf /var/cach/yum ; sudo yum -y clean all ; sudo yum -y remove mongodb* | |
| # Sanity check - are we on a RH family distro? | |
| [ -f "/etc/redhat-release" ] || { echo -e "This script requires RedHat or CentOS. Quitting. \n"; exit 1 ;} |
| cat access.log | grep Site | awk '{ print $1 }' | sort | uniq -c | sort -n |
| #!/bin/bash | |
| # dependencies: curl | |
| # example usage: cf_ban 192.168.0.1 | |
| # append cloudflare email address and API token: | |
| USER= | |
| TOKEN= |